EventLoop/ChildProcess: improve error handling

Fixes assertion failure with nonzero return of child process