delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/10/07/12:29:11

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Thu, 7 Oct 2004 11:30:42 -0500
From: Brian Ford <ford AT vss DOT fsi DOT com>
Reply-To: cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
Subject: Re: Calls to system() blocks return of SIGCHLD signal
In-Reply-To: <20041006184701.GQ29973@trixie.casa.cgf.cx>
Message-ID: <Pine.CYG.4.58.0410071118130.5620@fordpc.vss.fsi.com>
References: <BADF6263E3618145A44CC3A28C8E1243041461 AT hydra DOT montreal DOT ad-opt DOT com> <20041006184701 DOT GQ29973 AT trixie DOT casa DOT cgf DOT cx>
MIME-Version: 1.0
X-IsSubscribed: yes

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)
[snip]
> >if (cleanup->oldmask)
> >    sigprocmask (SIG_SETMASK, &(cleanup->oldmask), NULL);
> ># undef cleanup
> >}
[snip]
> >... but when the signal mask was previously empty (no blocked signals),
> >the sigprocmask call will not be done, therefore leaving SIGCHLD
> >blocked

Maybe I haven't had enough coffee yet this morning, but I'm inclined to
agree that this is a bug.

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
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
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019