Properly exit if child exited but didn't die

Happens, if for example you have a subprocess running in a shell but
exit the shell...