Backed out jodh's merged tests.
Made tests resilient to tests (pass 100+ iterations).
Fixed races:
- sigchild ariving, before read handler is called
Fixed aborts:
- due to multiple io reads, since process_fd pipe was not cleared
- job_process_error_handler returning EILSEQ
- double freeing io, when read handler is called before close handles
Backed out jodh's merged tests.
Made tests resilient to tests (pass 100+ iterations).
Fixed races:
- sigchild ariving, before read handler is called
Fixed aborts: error_handler returning EILSEQ
- due to multiple io reads, since process_fd pipe was not cleared
- job_process_
- double freeing io, when read handler is called before close handles