Hello,

    Main.cc installs a sig_child handler that catches SIGCHILD and calls
waitpid(). Watch_child() in main.cc also calls waitpid(). Why are we
waiting for the same thing in two places? Does not that create a race
condition, possibly not exiting waitpid() in watch_child() if the signal
handler is executed first?

Can we just skip sig_child installation (or do nothing in the handler)
if we are going to call watch_child()?

I must be missing something here.

Thank you,

Alex.

Reply via email to