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:31:00 -0500 From: Christopher Faylor To: cygwin-developers AT cygwin DOT com Subject: Re: tty and the cygwin server Message-ID: <20020117043100.GA6071@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> <20020117041203 DOT GA5805 AT redhat DOT com> <18cf01c19f0e$13242920$0200a8c0 AT lifelesswks> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18cf01c19f0e$13242920$0200a8c0@lifelesswks> User-Agent: Mutt/1.3.23.1i On Thu, Jan 17, 2002 at 03:18:52PM +1100, Robert Collins wrote: > >=== >----- Original Message ----- >From: "Christopher Faylor" > >> 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. > >heh. debug output help needed (I feel like a fr8**ing newbie). > >(gdb) attach 3648 >Attaching to program `/bin/sh.exe', process 3648 >[Switching to thread 3648.0xe14] >(gdb) step >Single stepping until exit from function _system_dlls__, >which has no line number information. You have to set some break points. You're single stepping in an unknown location in an unknown thread. You probably also have to switch to the correct thread. It may be thread 1 but with ttys there are more threads involved. info threads will display the thread. "thread 1" will switch to it. "bt" will show a back trace. It's possible that the back trace will be inaccurate in some cases due to system dll "frame pointerless" functions. >Program exited with code 0200400. > > ^ ^^^^^^^^^^^^ >How should this code be interpreted? dcrt0.cc: do_exit() > >(gdb) attach 2652 >Attaching to program `/bin/sh.exe', process 2652 >[Switching to thread 2652.0xbb0] >(gdb) stepi >0x77f970a4 in _system_dlls__ () 0x77* is a system DLL. I think the command is "info shared" to list DLLs but since my cygwin installation is currently hosed, I can't check. cgf