Re: Warning "Supervising process..." due to SIGCHLD from grand-parent

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

 



On Mo, 31.10.22 11:40, Lennart Poettering (lennart@xxxxxxxxxxxxxx) wrote:

> This is almost certainly a bug in chrony. If you use Type=forking,
> then the process that systemd forks off (let's call it "P") should
> wait until all of the below holds:
>
> 1. The middle child P' has exited
> 2. The grandchild (and main daemon process) P'' is running
> 3. The PID file has been successfully written to contain the PID of P''.

BTW, let me add an explanation, *why* this is needed: if they leave
P'' running for a bit longer, then there's a race: if for some reason
the deamon ends up failing shortly after starting up there is a race
if P' or P'' die first. If P'' dies first, then the service manager
will never see its SIGCHLD and cannot determine there was a
failure. If P' dies first then all is good, as the P'' SIGCHLD will be
properly collected by the service manager.

But anyway, it's 2022, chrony being stuck in sysv semantics is
sad. Use sd_notify().

Lennart

--
Lennart Poettering, Berlin



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux