[SOLVED] Procd service doesn't kill its children processes?

From what I have experienced, when a service is closing, it only kills the main process but doesn't kill the children processes that were executed by the main process.

Isn't it an unusual behavior for a service ?
That leads to having as many children/zombie processes running on the system as there have been services started then stopped.

Thank you in advance for your enlightenment

Your main process should take care of reapaing childs (waitpid) or ignoring SIGCHLD to avoid zombies.

It could be that other init managers call setsid() and friends to isolate the process group but procd currently does not do that.

I agree on this one. However, already more than 40years ago we had the principle of "egoless" programming and the basic rule of modularity: One module should not assume a special behaviour of another module.
As procd can be considered a module, it makes lot of sense to assume, that stopping a managed process includes stopping its children, too.

This depends on how these child processes where spawned and how they become zombies. Also I wouldn’t necessarily expect the process manager to hard-kill process childs.

Things can be probably improved but I need some simple way to reproand understand the issue first.

So far I‘ve not seen random zombies during normal operation with normal services.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.