| From | Sent On | Attachments |
|---|
| Subject: | Re: vfork instead of fork for fork+exec? | |
|---|---|---|
| From: | Dmitry Samersoff (dm...@samersoff.net) | |
| Date: | May 16, 2009 12:05:30 pm | |
| List: | net.java.openjdk.bsd-port-dev | |
Refine Search
| From | Sent On | Attachments |
|---|---|---|
| Charles Oliver Nutter | May 15, 2009 11:14 pm | |
| Martin Buchholz | May 15, 2009 11:43 pm | |
| Dmitry Samersoff | May 16, 2009 6:12 am | |
| Christos Zoulas | May 16, 2009 9:02 am | |
| Martin Buchholz | May 16, 2009 10:47 am | |
| Christos Zoulas | May 16, 2009 11:21 am | |
| Charles Oliver Nutter | May 16, 2009 11:55 am | |
| Dmitry Samersoff | May 16, 2009 12:05 pm | |
| Christos Zoulas | May 16, 2009 12:52 pm | |
| Martin Buchholz | May 16, 2009 2:01 pm | |
| Christos Zoulas | May 16, 2009 2:15 pm |
| Subject: | Re: vfork instead of fork for fork+exec? | |
|---|---|---|
| From: | Dmitry Samersoff (dm...@samersoff.net) | |
| Date: | May 16, 2009 12:05:30 pm | |
| List: | net.java.openjdk.bsd-port-dev | |
Christos,
Christos Zoulas wrote:
On May 16, 5:12pm, dm...@samersoff.net (Dmitry Samersoff) wrote: -- Subject: Re: vfork instead of fork for fork+exec?
| Charles, | | On BSD vfork() stops parent process until child exited or call exec. | It's not acceptable in multithreaded environment.
Yes, this could be a problem if the program does not run exec immediately after vfork(), but in practice most programs run exec, a couple of dups, and vfork because there is not much else you can legally do without trashing the state of your parent.
What does vfork() do with other threads? Does it stops it also ? What happens with mutexes - does the child inherit it?
Yes vfork is a weird syscall, annoying and difficult to use, but please don't make performance claims without actually doing any tests.
OK ;)
-- Dmitry Samersoff dm...@samersoff.net, http://devnull.samersoff.net * There will come soft rains ...

