Mail Archives: cygwin-developers/2002/01/16/23:13:49
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.
><http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/fhandler
>_tty.cc.diff?r2=1.50&r1=1.49.2.4&cvsroot=src&f=h>
>
>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.
>
>Yet...
>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.
cgf
- Raw text -