Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT cygwin DOT com Delivered-To: mailing list cygwin-developers AT cygwin DOT com Date: Wed, 16 Jan 2002 23:12:03 -0500 From: Christopher Faylor To: cygwin-developers AT cygwin DOT com Subject: Re: tty and the cygwin server Message-ID: <20020117041203.GA5805@redhat.com> Reply-To: cygwin-developers AT cygwin DOT com Mail-Followup-To: cygwin-developers AT cygwin DOT com References: <18c301c19f0c$7176a770$0200a8c0 AT lifelesswks> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18c301c19f0c$7176a770$0200a8c0@lifelesswks> User-Agent: Mutt/1.3.23.1i 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. >_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