From nobody Mon Dec 26 22:20:56 2022 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ngsgb6lbGz1J8VQ for ; Mon, 26 Dec 2022 22:20:59 +0000 (UTC) (envelope-from nhuff@acm.org) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ngsgb0q8pz4JMg for ; Mon, 26 Dec 2022 22:20:59 +0000 (UTC) (envelope-from nhuff@acm.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=i73NnDMr; spf=softfail (mx1.freebsd.org: 66.111.4.25 is neither permitted nor denied by domain of nhuff@acm.org) smtp.mailfrom=nhuff@acm.org; dmarc=fail reason="No valid SPF, DKIM not aligned (relaxed)" header.from=acm.org (policy=none) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 3518E5C0172; Mon, 26 Dec 2022 17:20:58 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 26 Dec 2022 17:20:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1672093258; x=1672179658; bh=ZvReuqgfyh2LOjFvE2s7UCKU55dm c5IJQ8Kaq/35Wqw=; b=i73NnDMrrd89M3P//0rEICLOWJWmVK1uNVUbZ+9G640L uvx5QicVgKWQLK0Jze6M7sTfW1n+obYkCDnZFC4o4aqzRbNg0KNZlTko4LZG0n8G PjQH4Le6reokPrrE2Jn8Zf3uwBakGK6b6fQURVBqtnhyeh+VNCw5Eeg8kDZp/8of 92Ai1Let1Qe2fEfZ9t4Cq5PpTcm/YdBxkCPLW3g3z33aRA029PqJ26hE0A6LMoC8 GNoB4QqPln6YBNcyjvnaeYVi4h1W2ZOAcpCqhSg58jgV/gtP6FCdEtgWlr0671xM 0sioGJkFDzu0+G8LmEJFfv5xnbeoUPWl9aUCMvTU/A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrheekgdduiedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffujghffffkgggtsehttdertd dttddtnecuhfhrohhmpefprghthhgrnhcujfhufhhfuceonhhhuhhffhesrggtmhdrohhr gheqnecuggftrfgrthhtvghrnhepffdviefftdeghefhheetkedtgfdujeekjeejjefhve fftdevveeuudeivdfgvdffnecuffhomhgrihhnpehfrhgvvggsshgurdhorhhgnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepnhhhuhhffhesrg gtmhdrohhrgh X-ME-Proxy: Feedback-ID: ida914761:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 26 Dec 2022 17:20:57 -0500 (EST) From: Nathan Huff To: freebsd-hackers@freebsd.org Subject: Re: daemon(8) exit behavior In-Reply-To: <23fba5e2-0f7d-b609-9ec0-009d6f6bd085@souji-thenria.net> References: <86tu1i6q2s.fsf@enyo.nrhuff.com> <23fba5e2-0f7d-b609-9ec0-009d6f6bd085@souji-thenria.net> Date: Mon, 26 Dec 2022 15:20:56 -0700 Message-ID: <86o7rp7qnr.fsf@enyo.nrhuff.com> List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain X-Spamd-Result: default: False [-4.40 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DWL_DNSWL_LOW(-1.00)[messagingengine.com:dkim]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[messagingengine.com:s=fm2]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[acm.org : No valid SPF, DKIM not aligned (relaxed),none]; RCVD_IN_DNSWL_LOW(-0.10)[66.111.4.25:from]; RWL_MAILSPIKE_GOOD(-0.10)[66.111.4.25:from]; DKIM_TRACE(0.00)[messagingengine.com:+]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; R_SPF_SOFTFAIL(0.00)[~all]; ASN(0.00)[asn:19151, ipnet:66.111.4.0/24, country:US]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 4Ngsgb0q8pz4JMg X-Spamd-Bar: ---- X-ThisMailContainsUnwantedMimeParts: N Souji Thenria writes: > 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. > I have submitted https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268580 with the patch. > > 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. I don't want to tie daemon too closely to the init system since I use it in other contexts at times so that is why I have the delay configurable. > Moreover, I think you should clean up the pidfile, if the daemon process > created it. IIRC that's also the current behavior. > The pidfiles do get cleaned up in my version. They just don't get cleaned up until the supervised process actually exits. With the current behavior the pidfiles can get removed even if the supervised process has not exited. -- Nathan Huff