Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • You can use the shell's builtin 'wait' command to reap each child and get its exit status, but you need to wait for a specific pid, otherwise it will not return until all children have exited. You don't want to wait in the signal handler though. This is tricky in bash, much easier to do it in C honestly. Commented Jun 17, 2011 at 10:11
  • Well, if I could get the PID in the signal handler I think I'd be fine, but I don't see anyway to get the PID. I know it can be easily done in other languages, but I'm trying to make an extension to a bash script. Commented Jun 17, 2011 at 10:13