This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On Tuesday 23 June 2009 14:44:24 David Wuertele wrote:
> 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?

i can almost guarantee you that drepper would tell you to go away, especially 
because your "problem" only manifests when you've turned off over commit.  
vfork() has ugly semantics whose implications are often not terribly clear 
until it's too late whereas fork() is always straightforward.  in this case, 
vfork() will probably work, but it doesnt really matter because fork() 
shouldnt be broken like Carlos pointed out.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]