Proper sub process cleanup, more robust blocking read emulation