Don't treat PIPE_FULL as fatal
Handle pipe reading similarly to how we handle writing
Add missing return value to read_and_print_args
Add error handling to flush_events
Remove read_return_value
Add some comments