From: Raffael Stocker <r.stocker@mnet-mail.de>
To: Tobias Geerinckx-Rice <me@tobias.gr>
Cc: 45202@debbugs.gnu.org
Subject: bug#45202: pcscd service (pcsc-lite) doesn't handle run directory properly
Date: Mon, 14 Dec 2020 06:54:47 +0100 [thread overview]
Message-ID: <87k0tlvsns.fsf@mnet-mail.de> (raw)
In-Reply-To: <87a6uij588.fsf@nckx>
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
next prev parent reply other threads:[~2020-12-14 5:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-12 14:31 bug#45202: pcscd service (pcsc-lite) doesn't handle run directory properly Raffael Stocker
2020-12-12 22:18 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2020-12-13 0:33 ` Raffael Stocker
2020-12-13 11:49 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2020-12-14 5:54 ` Raffael Stocker [this message]
2021-07-03 18:25 ` bug#45202: pcscd service doesn't respond to SIGTERM Brice Waegeneire
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k0tlvsns.fsf@mnet-mail.de \
--to=r.stocker@mnet-mail.de \
--cc=45202@debbugs.gnu.org \
--cc=me@tobias.gr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).