From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42806) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fpFq7-0003pq-L9 for guix-patches@gnu.org; Mon, 13 Aug 2018 12:37:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fpFq2-0000cg-KM for guix-patches@gnu.org; Mon, 13 Aug 2018 12:37:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:44882) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fpFq2-0000ca-FH for guix-patches@gnu.org; Mon, 13 Aug 2018 12:37:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fpFq2-0008Ki-3e for guix-patches@gnu.org; Mon, 13 Aug 2018 12:37:02 -0400 Subject: [bug#32358] Add pcscd service Resent-Message-ID: References: <87a7q2lqc6.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> <87zhxu7lr9.fsf@gmail.com> <87sh3jkyqg.fsf@gmail.com> <878t5b6u1r.fsf@lassieur.org> <87ftziybse.fsf@gmail.com> <87600e6xv6.fsf@lassieur.org> From: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur In-reply-to: <87600e6xv6.fsf@lassieur.org> Date: Mon, 13 Aug 2018 18:36:45 +0200 Message-ID: <874lfy6x5u.fsf@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Chris Marusich Cc: 32358@debbugs.gnu.org Cl=C3=A9ment Lassieur writes: >> However, I don't know if Shepherd uses that PID file for anything else >> while managing the process later on. > > No, it doesn't use the #:PID-FILE argument for anything else. However, > it does use the return value of the start procedure as a PID file to > automatically respawn the service if it's an integer. So you just need > to return (call-with-input-file pid-file read) instead of #t if you want > automatic respawning, as in > https://git.savannah.gnu.org/cgit/guix.git/commit/?id=3Dfdbca05d78d091bfc= 075e54c9fb90125262eadf0. Note that the 'running' slot would then have the PID value, and 'make-kill-destructor' would work, so no need to change the stop procedure.