tty and the cygwin server

Christopher Faylor
Wed Jan 16 20:15:00 GMT 2002

On Thu, Jan 17, 2002 at 03:07:12PM +1100, Robert Collins wrote:
>Ok, looking at the problem Gary reported, I've realised I don't
>understand tty's :].
>So I'm asking for a quick lesson.
>To save anyone looking at the code, here's the key differences between
>MAIN and cygwin_daemon.
>in fhandler_tty_slave::open,
>MAIN uses a single temp handle variable in the duplicate calls ,
>cygwin_daemon always uses two.
>MAIN always does the duplication internally, cygwin_daemon only does it
>internally if the cygserver call fails.
>I can't see any substantial differences other than that.
>running the daemon, rxvt quits after the first command is given to ash.
>Without running the daemon, rxvt operates fine.
>My question is, what occurs between accept_input and
>process_slave_output in rxvt that could result in ash (the slave)
>quitting? I can't get a strace of the slaves behaviour so far, which is
>why I'm turning for inspiration here...

Probably it is looking like stdin (the pty) is being closed for some
reason.  That seems to be what's happening from the strace.  Or it has
received a signal?  You should be able to attach to the process via gdb
and watch it happen.


More information about the Cygwin-developers mailing list