Skip to content
Advertisement

How to forking process in a way such that reaping the child isn’t neccessary

I seem to have a vague memory that some facility in Linux exists that allows one to fork() a process in such a way that the child is automatically reaped by the system without a zombie being created. What is this mechanism? Or is my memory just wrong?

Advertisement

Answer

The portable way to do this is to double-fork:

JavaScript
Advertisement