cygwin-2 process handling (about SIGHUP)

Corinna Vinschen corinna-cygwin@cygwin.com
Mon Jun 8 12:09:00 GMT 2015


Hi Takashi,

On Jun  7 09:03, Takashi Yano wrote:
> Hi Corinna,
> 
> On Thu, 28 May 2015 16:16:12 +0200 Corinna Vinschen wrote:
> 
> > I applied this patch.  I'm not comfortable with removing the SIGHUP
> > handling from slave::read in favor of just setting errno to EIO.
> > EIO seems wrong here.  Not being able to access the pipe anymore
> > should be equivalent to a hangup.  Alternatively the return code
> > from the Windows function should be checked for ERROR_BROKEN_PIPE,
> > perhaps, but that introduces some more code,
> 
> Regarding SIGHUP, I have a different thought.
> [...]
> To make the behaviour match with the test results on other
> systems, I have made a patch attached (cygwin.patch.20150604).
> 
> With this patch, everything works nicely for me as well.
> 
> Furthermore, with this patch, mc (midnight commander) becomes
> exiting normally. On cygwin 2.0.3-1, mc has a problem which
> leaves a subshell process on the background.
> 
> To reproduce this problem, execute
> env SHELL=/bin/bash mc
> on cygwin 2.0.3-1, and type 'exit'.
> 
> You will find bash process remains in background. I have confirmed
> this problem can be resolved by this patch.
> 
> For the reason above, I think it is better to make the behaviour
> match with other systems as well as the POSIX specification.
> 
> What do you think?

You convinced me.  I applied your patch.  I'll generate a developer
snapshot later today.  It would be nice if it could get a thorough
testing.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20150608/d11e1d72/attachment.sig>


More information about the Cygwin mailing list