[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pvfork()



Pvfork() behaves exactly as it should (and exactly as vfork() does under
BSD Unix). If the parent and child were both running in the same
address space at the same time, they could easily trample on each other;
in particular, their stacks are very susceptible to damage (imagine the
potential for havoc if the child calls exec() at the same time the parent
calls another function; since both processes are using the same stack,
the local variables in exec() and in the parent's foo() function would
occupy the same space in memory!

Eric