Re: Why does "system" have to block SIGCHLD?
- From: loic-dev@xxxxxxx
- Date: 26 Nov 2006 05:44:01 -0800
Hello Ronald,
Why does "system" have to block SIGCHLD?
as explained by the Authoritative documentation, the Single Unix
Specification standard:
http://www.unix.org/version3/online.html:
<copy>
The system() function shall ignore the SIGINT and SIGQUIT signals, and
shall block the SIGCHLD signal, while waiting for the command to
terminate. If this might cause the application to miss a signal that
would have killed it, then the application should examine the return
value from system() and take whatever action is appropriate to the
application if the command terminated due to receipt of a signal.
[...]
Blocking SIGCHLD while waiting for the child to terminate prevents the
application from catching the signal and obtaining status from
system()'s child process before system() can get the status itself.
</copy>
Cheers,
Loic.
.
- References:
- Why does "system" have to block SIGCHLD?
- From: Ronald
- Why does "system" have to block SIGCHLD?
- Prev by Date: Why does "system" have to block SIGCHLD?
- Next by Date: Re: Blocking read() from a USB->Serial adapter.
- Previous by thread: Why does "system" have to block SIGCHLD?
- Index(es):
Relevant Pages
|