This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: getpid after vfork broken in recent glibc
> Date: Mon, 8 Mar 2004 21:52:55 -0500
> From: Daniel Jacobowitz <drow@false.org>
> >
> > We might as well simply always use fork -- the "performance" benefit is
> > hardly valid any more (Hmm, perhaps something related to this is why
> > vfork never worked, and hence was disabled, on HP/UX).
>
> Since I went to some trouble to make "shell escape" use vfork when
> possible (2003-06-21), I have to disagree with your assumption. When
> GDB is using a good-sized chunk of the RAM on a system, forking
> unnecessarily is a real pain.
>
> Given the idiotic definition of vfork, though, I guess we don't have a
> choice.
How about if glibc did us a small favor and invalidated its cached
PID on a vfork?