[PATCH] Fix start-stop-daemon on no-MMU

Denis Vlasenko vda.linux at googlemail.com
Thu Aug 2 10:36:46 UTC 2007


> > > The child merely execv()s.
> >
> > So on NOMMU execv() basically creates another process in another
> > memory region, and
> > terminates current one, unless there is a parent sitting in vfork and waiting
> > (in which case parent is woken up instead of exit)?
>
> No, execve works exactly it does on an MMU system. It loads a new executable into the
> current process.

...trashing all memory area occupied by the process? how parent is
able to run then?

> The difference is with vfork: on vfork, the parent is suspended, and the
> child shares it's whole address space with the parent (the stack is shared too - that's
> why this is so tricky!). The parent is resumed when the child either execve()s or
> _exit()s.

I don't understand how parent is able to run if execve just nuked
parent's text segment
with unrelated code of execed program.
--
vda



More information about the busybox mailing list