cvs commit: src/include Makefile spawn.h unistd.h src/lib/libc/gen exec.3 exec.c posix_spawn.c

David Xu davidxu at
Wed Jun 18 01:43:10 UTC 2008

David Xu wrote:

> I just want to make some programs to work, since Linux and Solaris
> both have it now. Doing it in kernel is OK, but I don't want to put
> it into the kernel until it is necessary since kernel code can not
> be swapped out. ;-)
> Doing in kernel may have advantages, for example, you may get ride
> of zoombie process recycling by hacking kernel, a library version
> using vfork will need parent to handle SIGCHLD and recycle zoombie 
> process like you use popen() and system() etcs,

Oops, I rethinked it, zoombie process is not a correct point.
only rtld is the problem.

> another advantage
> is it won't involve rtld if a symbol needs to resolved, because
> vfork shares same vmspace, it might block other threads in
> parent process if the child process holding a rtld's
> reader lock, I don't know if writer lock will be held in child,
> I guess it won't be. if the child process get killed wrongly
> by someone, it might hold reader lock forever, this is the race
> condition. a kernel version may have trouble if something can not
> be easily done in kernel, though I didn't find the one can not
> be done in kernel at present.
> Regards,
> David Xu

More information about the cvs-src mailing list