daemons icon indicating copy to clipboard operation
daemons copied to clipboard

Zombie/Defunct process when monitoring using pidfiles

Open chtrinh opened this issue 2 years ago • 0 comments

Looks like the fork process is still sticking around leading to a zombie process, if the main ruby thread is still running. https://github.com/thuehlinger/daemons/blob/master/lib/daemons/monitor.rb#L62-L63

Not that big of a deal but it could used up the process table.

Possible fix?

pid_fork = fork { ... }
Process.waitpid(pid_fork)

chtrinh avatar Dec 28 '22 21:12 chtrinh