![]() |
& | ![]() |
POSIX added an interface that for this purpose: posix_spawn. This is a combined fork+exec and can be used to implement popen and more advanced things. FreeBSD and some other systems have a userspace implementation, which works, but can't reap the benefits mentioned above.
Implementing a real posix_spawn system calls could do that. Measuring the impact for different work loads makes a nice research paper as side effect. This includes both estimate the temporary memory used and the performance implications.
Aug 18th update
Deadline of the project is approaching. The core function is in an usable state while there are something to do.
The code is available at http://netbsd-soc.cvs.sourceforge.net/viewvc/netbsd-soc/posix_spawn/
1. Port FreeBSD's userland implementation of posix_spawn
2. Implement posix_spawn in kernel space and its helper functions in libc.
The propotype of some kernel routines is changed in order to be used by posix_spawn.
Now posix_spawn can be used to spawn process. You can also pass posix_spawn_file_actions
as parameters but posix_spawnattr has some bugs.
3. Write test cases for posix_spawn family
1. fix the remaining bugs including posix_spawnattr and others
2. performance test between kernel & userland version of posix_spawn
3. tune some programs to use posix_spawn, such as make or /bin/sh
|
|
|