PTY dies when master in parent process is closed.

Corinna Vinschen corinna-cygwin@cygwin.com
Mon Mar 9 09:18:00 GMT 2015


Hi Takashi,

On Mar  8 16:37, Takashi Yano wrote:
> On Fri, 6 Mar 2015 20:07:10 +0900
> Takashi Yano <takashi.yano@nifty.ne.jp> wrote:
> 
> > On Thu, 5 Mar 2015 14:58:39 +0100
> > Corinna Vinschen <corinna-cygwin@cygwin.com> wrote:
> > 
> > > I applied a patch.  Please have a look.
> > 
> > I have tested the latest CVS version, and found
> > a new problem.
> > 
> > With new CVS version, slave side can not detect
> > closure of master.
> > 
> > Please use following Test Case 3. Test Case 3 is
> > not terminated by itself with latest CVS.
> > 
> > It seems that the program is stopping at
> > cygwait(input_available_event, time_to_wait)
> > in fhandler_pty_slave::read().
> > 
> > I guess input_available_event should be set when
> > the last valid master fd is closed.
> 
> For this problem, I have made a patch.
> 
> With this patch, it has been confirmed that the problems
> in Test Case 1, 2 and 3 are fixed.
> 
> I am glad if this would be a help.
> 
> However, one matter to be concerned is irregular use of
> PeekNamedPipe(). Maybe alternative means could be better
> for detecting closure of all master fds.

thanks for the patch.  I'll have a look later this week.  Today and
tomorrow I'll be busy with the conversion of the current newlib/cygwin
CVS repo to git.  Hopefully your copyright assignment has arrived by
then, too.


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/20150309/cc3e0208/attachment.sig>


More information about the Cygwin mailing list