This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Regression (last snapshot)


On Aug  2 14:34, Ken Brown wrote:
> On 8/1/2019 10:32 PM, Ken Brown wrote:
> > On 8/1/2019 5:17 PM, Ken Brown wrote:
> >> On 8/1/2019 12:04 PM, Corinna Vinschen wrote:
> >>> On Aug  1 10:38, Eric Blake wrote:
> >>>> Could it be a case of xwin-xdg-menu calling signal(SIGPIPE, SIG_IGN) or
> >>>> similar, and accidentally letting grep inherit the ignored SIGPIPE?
> >>>
> >>> execve doesn't propagate the signal dispositions, they get reset to
> >>> default.
> >>
> > I just built a version of grep in which I added 'signal(SIGPIPE, SIG_DFL)', and
> > the error is gone.  So it looks like grep has in fact been receiving SIGPIPE,
> > and for some reason it is not using the default signal handler for SIGPIPE in a
> > terminal started by xwin-xdg-menu.  Could this be a gtk issue?  Does it mess
> > with the signal handlers?
> 
> I think I've finally got it.
> 
> First of all, here's what POSIX says about signal handlers after an exec:
> 
> "Signals set to the default action (SIG_DFL) in the calling process 
> image shall be set to the default action in the new process image. 
> Except for SIGCHLD, signals set to be ignored (SIG_IGN) by the calling 
> process image shall be set to be ignored by the new process image. 
> Signals set to be caught by the calling process image shall be set to 
> the default action in the new process image (see <signal.h>)."

Oh, I see.  I misread the exceve man page.  Only signals which are caught
will be reset to SIG_DFL.  Sorry for the noise.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]