posix_spawn is stupid as a system call
posix_spawn is stupid as a system call
Posted Nov 5, 2009 13:10 UTC (Thu) by helge.bahmann (subscriber, #56804)In reply to: The existence of OOM is one of the few really stupid things in Linux by epa
Parent article: Toward a smarter OOM killer
call?
fork + set*uid/set*gid + exec
fork + chroot + chdir + exec
fork + close(write_side_of_pipe/read_side_of_pipe) + dup2() + exec
fork + open(arbitrary set of files) + exec
fork + sched_setscheduler/sched_setparam/sched_setaffinity... + exec
fork + personality + exec
fork + setpgid + exec
not to mention the various clone flags (fs namespace etc.) and any wild
combination of the above
I think I have needed all of the above in various circumstances, sometimes
two or three things between fork+exec at a time
bonus question: how many more parameters do you want to add to a "combined
fork/exec" syscall to make it future proof for other things that might
need to be done before the new process image is executed?
