Do not restart a child when it gets some term sig.

If a child gets some termination signal, for example SIGSEGV, we should
terminate wait loop and do not try to restart that process as it would
likely repeat the issue and drop inifinite count of core files
subsequently.