This is the mail archive of the libc-hacker@cygnus.com 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]

Re: vfork specs


> The Solaris vfork() does not permit the child's computation to be
> interleaved with the parent's; after vfork(), the parent cannot run
> until the child exits or calls exec.  Except in multi-threaded
> applications, when only the calling thread of control is suspended,
> see the second paragraph from the manual page.

Well, exactly.  It would be incomprehensibly inane to attempt to have a
vfork that did not behave that way, because of exactly this problem.  It
had not before now entered my mind that Linux might have such a thing as a
vfork where both processes ran simultaneously in the same address space.

The restrictions I referred to are those on the child process not to unwind
stack frames because when the parent resumes later (after the child has
exec'd or exited), its stack pointer will be the same as it was and it will
attempt to unwind into the stack frames the child has clobbered.


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