From: Daniel Jacobowitz <drow@false.org>
To: Mark Kettenis <kettenis@gnu.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFC] To fork or to vfork
Date: Sun, 28 Nov 2004 17:55:00 -0000 [thread overview]
Message-ID: <20041128175506.GF24639@nevyn.them.org> (raw)
In-Reply-To: <200411232217.iANMH3F9014455@elgar.sibelius.xs4all.nl>
On Tue, Nov 23, 2004 at 11:17:03PM +0100, Mark Kettenis wrote:
> It's now pretty clear to me why HP-UX 11.xx needs -Dvfork=fork. In
> order to set up a child to be traced using the HP-UX ttrace(2) system
> call, it needs to do some handshaking. It uses two pipes to do this.
> The child writes to one end to indicate that it's ready to be traced.
> When the parent is able to read from the other end it will set things
> up such that the child is properly traced. It then indicates that the
> child may continue by writing on the other pipe. However, since the
> parent is suspended while the child is in the vforked state, this
> doesn't work, and the debugger hangs.
>
> Now I think we all agree that the -Dvfork=fork is pretty ugly. Here's
> an alternate approach. It's pretty likely that if PRE_TRACE_FUN is
> non-null things are complicated enough that it's unlikely that a vfork
> will work correctly. I therefore propose the attached patch.
>
> If there are no objections, I'll check this in in a few days.
No objections - this sounds like a great reason to use fork.
We're already stretching (read: way past) what is guaranteed to work
after vfork, and it's bitten us before, but the optimization is so
important on some targets...
--
Daniel Jacobowitz
next prev parent reply other threads:[~2004-11-28 17:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-23 22:17 Mark Kettenis
2004-11-28 17:55 ` Daniel Jacobowitz [this message]
2004-11-29 9:01 ` Mark Kettenis
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=20041128175506.GF24639@nevyn.them.org \
--to=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
--cc=kettenis@gnu.org \
/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