Using vfork() in do_system() instead of fork()

David Wuertele
Tue Jun 23 18:44:00 GMT 2009

Mike said:

> since there's pretty much no chance of do_system() changing, why not use your
> simple wrapper.  the amount of code needed to do vfork+exec on a string is
> pretty small.

Oh, the work involved is not the issue.  I just wanted to make sure
that I wasn't
doing something that the glibc developers had already decided was a bad idea.

But why do you say there's no chance of do_system() changing?  If using vfork()
actually has no problems, it seems like it would be an advantage to all users of
system().  Is the fact that the parent doesn't get scheduled until
after the execl()
a performance issue?


More information about the Libc-help mailing list