Re: [dev] [st] [PATCH] Fix sigchld
Hi,
> Only wait for termination of the shell.
...
> - if(waitpid(pid, &stat, 0) < 0)
> + if((p = waitpid(pid, &stat, WNOHANG)) < 0)
> die("Waiting for pid %hd failed: %s\n", pid, strerror(errno));
I don't understand this patch. The master process only has one child,
the shell, so you only can wait for it. If you receives the signal is
because the child already died, so I don't see the point of adding
WNOHANG. Can you explain a bit better what you want to do?
Regards,
Received on Mon Apr 27 2015 - 10:42:07 CEST
This archive was generated by hypermail 2.3.0
: Mon Apr 27 2015 - 10:48:18 CEST