This is the mail archive of the
mailing list for the Cygwin project.
Re: Calls to system() blocks return of SIGCHLD signal
On Wed, 6 Oct 2004, Christopher Faylor wrote:
> On Wed, Oct 06, 2004 at 12:24:48PM -0400, Remy Gauthier wrote:
> >We have noticed (on V1.5.10-1 and V1.5.11-1) that after a call to
> >system(), the handlers were not being called after the child process
> >stopped. This program has this behaviour (removing the call to
> >system() will restore correct SIGCHLD handling):
[snip; from Linux system(3)]
> During execution of the command, SIGCHLD will be blocked, and SIGINT and
> SIGQUIT will be ignored.
Um..., I think you missed the point here cgf as this didn't answer the
question. The key word above is "During". He was reporting that it was
still in effect "after", and he identified the cause here:
> >Then, when the child has completed, a cleanup process is done:
> >static void
> >do_cleanup (void *args)
> ># define cleanup ((pthread_cleanup *) args)
> >if (cleanup->oldmask)
> > sigprocmask (SIG_SETMASK, &(cleanup->oldmask), NULL);
> ># undef cleanup
> >... but when the signal mask was previously empty (no blocked signals),
> >the sigprocmask call will not be done, therefore leaving SIGCHLD
Maybe I haven't had enough coffee yet this morning, but I'm inclined to
agree that this is a bug.
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
the best safety device in any aircraft is a well-trained pilot...
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html