This is the mail archive of the
mailing list for the GCC project.
Re: PATCH RFC: Remove fork from collect2
Zack Weinberg <firstname.lastname@example.org> writes:
> Gunther Nikl <email@example.com> writes:
> > Yes, popen() is supported. It uses vfork+execl itself.
> > I just noticed that FreeBSDs popen() does uses vfork(). Thus it seems
> > possible to use it. I don't remember why vfork was dropped in pexecute
> > by Zack Weinberg.
> It's not safe. The pexecute child code does stuff you can't do after
Only in the error case, though, in which execv fails. That case more
or less never happens.
How would you feel if we switched back to vfork, and changed the error
I ask because the timings I've seen floating around indicate that
vfork is still faster than fork, despite all the fork tuning that has
been done the years.