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: select() hanging after terminal killed


On Apr 29 12:53, Thomas Wolff wrote:
> If a terminal gets killed, its tty/pty is not properly closed.
> This is likely to confuse applications and let them hang, as observed 
> with mined (thanks Andy for the report) and joe.
> 
> On Linux and SunOS, a subsequent read() return 0 (indicating EOF);
> any further read() returns -1, errno indicating EIO.
> Immediate write() may report success a few times, 
> further write() returns -1, errno indicating EIO.
> 
> On Linux, select() indicates an exception and EIO.
> On SunOS, select() indicates both an exception and input (weird),
> and ENOENT initially, EIO on further attempts.
> 
> On Cygwin, the following is observed:
> * EOF is not signalled on read(); rather EIO is indicated right away.
>   (Maybe not too bad, an application can handle that as well.)
> * select() with timeout hangs.
> 
> Especially the latter can hardly be handled by an application.

Can you create a simple testcase?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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