child process handling reworked