Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: qpan@mvista.com, gdb-patches@sources.redhat.com, qunyingpan@gmail.com
Subject: Re: Patch: fix gdb_gcore.sh failure in ash/dash
Date: Sun, 11 Sep 2005 23:08:00 -0000	[thread overview]
Message-ID: <20050911230730.GA7362@nevyn.them.org> (raw)
In-Reply-To: <200509112118.j8BLIu6J009512@elgar.sibelius.xs4all.nl>

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 <qpan@mvista.com>
> > 
> > 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


  reply	other threads:[~2005-09-11 23:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-10  2:18 Qunying Pan
2005-09-11  1:12 ` Michael Snyder
2005-09-11  4:35   ` Daniel Jacobowitz
2005-09-11 21:37     ` Qunying Pan
2005-09-11 21:19 ` Mark Kettenis
2005-09-11 23:08   ` Daniel Jacobowitz [this message]
2005-09-17 21:58 ` Daniel Jacobowitz
2005-09-17 22:18   ` Mark Kettenis
2005-09-17 22:27     ` Daniel Jacobowitz
2005-09-26  1:52       ` Daniel Jacobowitz
2005-09-26  7:20         ` Mark Kettenis
2005-10-02 23:01           ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050911230730.GA7362@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=mark.kettenis@xs4all.nl \
    --cc=qpan@mvista.com \
    --cc=qunyingpan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox