1

fork a long-running process and avoid having to call waitpid to clean up the zombie?

view story
linux-howto

http://stackoverflow.com – I have a long-running process (node.js) which calls fork (as part of a C++ module). This creates the new process as a child of the node.js process. However, there is nothing that will wait/waitpid for this child process, so it remains a zombie after it's terminated. Is it possible to fork() a process without the current process being its parent, so that upon termination, it does not remain in the zombie state but is cleaned up? If not, can I somehow indicate that I will not call waitpid on the child and don't care about when it terminates? Failing all that, I can write/find a native module (HowTos)