The initial patch seems to cover edge cases I fail to grasp and probably doesn't cover all scenarios. Could someone please tell me why SIGCHLD should be received while requiring waitpid to WNOHANG, and why st prints an error message for nonzero exit status instead of propagating it?
I haven't read koneu's suggestion yet, I hope it doesn't leave as much room for questions. cheers! mar77i