[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Re: piece of mind

On Fri, Oct 24, 2014 at 8:54 AM, Josselin Mouette <joss@debian.org> wrote:
> Jonathan de Boyne Pollard wrote:
>         You know, or at least should know, as well as I that one can
>         centralize the code to do all of those things, and abstract them out of
>         daemons into a service manager, without that service manager being
>         process #1.
> I don’t know whether you are aware of how a UNIX system works, but you
> might not have heard of how orphan processes are managed.
> >From waitpid(2):
>        If a parent process terminates, then its "zombie" children (if any) are
>        adopted by init(8), which automatically performs a wait to  remove  the
>        zombies.
> Said otherwise, it is not possible to write a reliable service manager
> without integrating it to what happens in process #1.

You certainly can if you use PRCTL_SET_CHILD_REAPER (only on Linux
3.4+ I think), or do not support forking daemons.

Both options are undesirable in different ways, but systemd already
requires the prctl so any alternative would not be any worse than
systemd in that respect.

Cameron Norman

Reply to: