I need to fork an exec from a server. Since my servers memory foot print is large, I intend to use vfork() / linux clone(). I also need to open pipes for stdin / stdout / stderr. Is this allowed with clone() / vfork()?
I need to fork an exec from a server. Since my servers memory foot
Share
From the standard:
The problem with calling functions like
setuidorpipeis that they could affect memory in the address space shared between the parent and child processes. If you need to do anything beforeexec, the best way is to write a small shim process that does whatever you need it to and thenexecs to the eventual child process (perhaps arguments supplied throughargv).