issues with clone vs fork

Mike Frysinger vapier at gentoo.org
Fri Mar 24 15:50:58 UTC 2006


On Friday 24 March 2006 05:24, Rogelio Serrano wrote:
> What are the issue with clone vs fork? Is it safe? Im running init
> with clone - exec instead of fork - exec and i am not seeing a
> difference besides private namespaces.

people generally use vfork() in order to then exec() something
if (vfork()) execl("/bin/ls", "/bin/ls", NULL);

clone() is not portable by any means ... it's even architecture specific (for 
example, x86, hppa, and ia64 have to be handled differently)
-mike



More information about the busybox mailing list