From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29138 invoked by alias); 11 Sep 2005 23:08:06 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 29090 invoked by uid 22791); 11 Sep 2005 23:07:37 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sun, 11 Sep 2005 23:07:37 +0000 Received: from drow by nevyn.them.org with local (Exim 4.52) id 1EEav5-00023c-Go; Sun, 11 Sep 2005 19:07:31 -0400 Date: Sun, 11 Sep 2005 23:08:00 -0000 From: Daniel Jacobowitz To: Mark Kettenis Cc: qpan@mvista.com, gdb-patches@sources.redhat.com, qunyingpan@gmail.com Subject: Re: Patch: fix gdb_gcore.sh failure in ash/dash Message-ID: <20050911230730.GA7362@nevyn.them.org> Mail-Followup-To: Mark Kettenis , qpan@mvista.com, gdb-patches@sources.redhat.com, qunyingpan@gmail.com References: <432240C1.9000308@mvista.com> <200509112118.j8BLIu6J009512@elgar.sibelius.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200509112118.j8BLIu6J009512@elgar.sibelius.xs4all.nl> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-09/txt/msg00076.txt.bz2 On Sun, Sep 11, 2005 at 11:18:56PM +0200, Mark Kettenis wrote: > > Date: Fri, 09 Sep 2005 19:11:13 -0700 > > From: Qunying Pan > > > > Hi, > > > > Running gdb_gcore.sh in ash/dash fails with message "Hangup detected on > > fd 0". The following patch fixes the problem. Acceptable? > > This seems like a bug in ash/dash (whatever that is). Why isn't your > /bin/sh not a proper bourne shell? > > I'm not inclined to apply this patch just because people link /bin/sh > to some random piece of crap. So I'd like to see somewhat more > motivation. It's perfectly legitimate behavior, as far as I can tell - it depends how long the shell keeps the pipe open and whether it uses a tempfile. IIRC bash will prefer to use a tempfile and ash will pipe? Not sure. GDB detects the SIGHUP before it writes out the coredump. Try this, in either ash or bash: printf 'printf "hi\\n"\nquit\n' | gdb Neither shell's going to give you a printf, just a hangup message. -- Daniel Jacobowitz CodeSourcery, LLC