Catch dead child processes

See discussion in #440