Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Dec 2022 19:28:20 +0100
From:      Souji Thenria <mail@souji-thenria.net>
To:        Nathan Huff <nhuff@acm.org>, freebsd-hackers@freebsd.org
Subject:   Re: daemon(8) exit behavior
Message-ID:  <23fba5e2-0f7d-b609-9ec0-009d6f6bd085@souji-thenria.net>
In-Reply-To: <86tu1i6q2s.fsf@enyo.nrhuff.com>
References:  <86tu1i6q2s.fsf@enyo.nrhuff.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 12/26/22 18:18, Nathan Huff wrote:
> 
> 1. Is there any interest in upstreaming this?
> 

Because I run in to this problem as well in the past, I would be most 
interested in this.

> 2. What should happen if the supervised process doesn't exit after the
> KILL signal is sent? Something has probably gone sideways somewhere if
> we end up here, but I have definitely seen cases where something is
> stuck with signals blocked.  Currently my modification waits for the
> process to actually exit possibly indefinitely. I chose that because I
> don't think we should clean up PID files if the process is in fact still
> running, but I can see wanting the daemon process to exit even if the
> supervised process is still running as that is the current behavior and
> still the behavior if a shutdown delay is not specified in my modified
> version.
> 

I think using the timeout limit which is used by FreeBSD when shutting 
down the system, makes the most sens and would have some consistency 
throughout the system, at leas in my opinion.
Moreover, I think you should clean up the pidfile, if the daemon process 
created it. IIRC that's also the current behavior.

-- 
Souji Thenria




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?23fba5e2-0f7d-b609-9ec0-009d6f6bd085>