DaanDeMeyer / reproc

A cross-platform (C99/C++11) process library
MIT License
552 stars 65 forks source link

Reproc leaves child process as a zombie if it daemonizes #106

Open stingray-11 opened 1 year ago

stingray-11 commented 1 year ago

I'm using reproc to start a process that daemonizes (it forks, the original process exits and the new child detaches). This results in the child process started by reproc remaining as a zombie. Reproc then waits for the new daemon process to end rather than returning right away when the original child exits. If I do the same thing but via a manual system() or execvp(), they return immediately when the child forks, which is the behavior I expect.