[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Dangerous assumption in MINT lib
Joerg_Westheide@su.maus.de (Jörg Westheide) writes:
|> Hi Andreas!
|> AS>To make this work the parent must not run at the same time as the
|> AS>child, so it is blocked (in the kernel) until the child calls _exit()
|> AS>or execve() (Pterm/Pexec in MiNT speak).
|> Am I right that the child is not allowed to exit the procedure in which
|> vfork() is called?
Yes. That would clobber the parent's stack.
|> An example:
|> void bear(void)
|> if (vfork() == 0)
|> Is the child allowed to exit the procedure bear()?
|> Or has do_something to terminate the child (by _exit() or execve())?
Andreas Schwab "And now for something
firstname.lastname@example.org completely different"