GNU bug report logs - #45202
pcscd service doesn't respond to SIGTERM

Previous Next

Package: guix;

Reported by: Raffael Stocker <r.stocker <at> mnet-mail.de>

Date: Sat, 12 Dec 2020 19:24:01 UTC

Severity: normal

Done: Brice Waegeneire <brice <at> waegenei.re>

Bug is archived. No further changes may be made.

Full log


Message #32 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Raffael Stocker <r.stocker <at> mnet-mail.de>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: bug-guix <at> gnu.org, 45202 <at> debbugs.gnu.org
Subject: Re: bug#45202: pcscd service (pcsc-lite) doesn't handle run
 directory properly
Date: Mon, 14 Dec 2020 06:54:47 +0100
Tobias Geerinckx-Rice writes:

>> However, I now noticed a new one: pcscd doesn't seem to be killable
>> easily (at least not by a TERM signal), so "herd stop pcscd" has
>> no effect.  Sending a KILL signal and starting with "herd start pcscd"
>> works without problems, though.
>
> I can reproduce this.  Interestingly(?) it only affects the pcscd started by
> Shepherd.
>
> Manual $(guix build pcsc-lite)/sbin/pcscd invocations, both with and without
> --foreground, are eminently killable with TERM alone.

Interesting indeed.  From looking at the source of pcsc-lite (main() in
pcscdaemon.c) it seems it's not modifying its sigmask.  IIRC, child
processes inherit the parent's ignored signals, so if shepherd is
ignoring SIGTERM before a fork() and not resetting to default before an
exec(), pcscd will never receive the SIGTERM.  This might explain the
behaviour.  I have not checked shepherd's source to confirm.

If this is so, it should probably be fixed in shepherd, right?

Regards,
Raffael




This bug report was last modified 3 years and 324 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.