From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.54) id 1EvwFJ-0003nX-Eh for garchives@archives.gentoo.org; Mon, 09 Jan 2006 12:35:33 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.5/8.13.5) with SMTP id k09CYo9r031756; Mon, 9 Jan 2006 12:34:50 GMT Received: from mail.marples.name (rsm.demon.co.uk [80.177.111.50]) by robin.gentoo.org (8.13.5/8.13.5) with ESMTP id k09CWYwl010711 for ; Mon, 9 Jan 2006 12:32:34 GMT Received: from uberlaptop.development.ltl (logos [195.2.133.104]) by mail.marples.name (Postfix) with ESMTP id 576A490678AA for ; Mon, 9 Jan 2006 12:32:34 +0000 (GMT) From: Roy Marples To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] init scripts and custom signals Date: Mon, 9 Jan 2006 12:32:32 +0000 User-Agent: KMail/1.9 Organization: Gentoo Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200601091232.32522.uberlord@gentoo.org> X-Archives-Salt: f1cc8981-c17f-4bcc-859a-c224710dbb1b X-Archives-Hash: f1b6f784df2e6cb640784f24def730af Hi It's been brought to my attention that dnsmasq and acpid use start-stop-daemon to send custom signals such as HUP. While this works with baselayout-1.11, it does not work with baselayout-1.12 The start-stop-daemon-binary has to have either a --start or --stop option. Now I read this as two simple statements. 1) I want to start daemon foo 2) I want to stop daemon foo The aforementioned init scripts want option 3 3) I want to stop daemon foo with signal HUP Which is perfectly valid. However, HUP is not a stop signal and they expect it to process the signal and not stop. baelayout-1.12 is a bit more strict about things. If you ask something to --stop it stops regardless. So, the question now must be, do we allow start-stop-daemon to defy calling logic and NOT stop a daemon? How do we know we're not supposed to stop the daemon based on a custom signal? The answer is we can't. So instead of start-stop-daemon --stop -s HUP -p /var/run/dnsmasq.pid we need to write kill -s HUP $(< /var/run/dnsmasq.pid) Thanks -- Roy Marples Gentoo Linux Developer -- gentoo-dev@gentoo.org mailing list