From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id UHFhAEH+1l/xLwAA0tVLHw (envelope-from ) for ; Mon, 14 Dec 2020 05:55:13 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id KALuN0D+1l8nKwAA1q6Kng (envelope-from ) for ; Mon, 14 Dec 2020 05:55:12 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 458FE9404E2 for ; Mon, 14 Dec 2020 05:55:12 +0000 (UTC) Received: from localhost ([::1]:34446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kogpC-0004Pg-2o for larch@yhetil.org; Mon, 14 Dec 2020 00:55:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46638) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kogp4-0004PW-EO for bug-guix@gnu.org; Mon, 14 Dec 2020 00:55:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:39307) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kogp4-0002iJ-7d for bug-guix@gnu.org; Mon, 14 Dec 2020 00:55:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kogp4-0006lU-4m for bug-guix@gnu.org; Mon, 14 Dec 2020 00:55:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#45202: pcscd service (pcsc-lite) doesn't handle run directory properly Resent-From: Raffael Stocker Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 14 Dec 2020 05:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45202 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Tobias Geerinckx-Rice X-Debbugs-Original-Cc: bug-guix@gnu.org, 45202@debbugs.gnu.org Received: via spool by 45202-submit@debbugs.gnu.org id=B45202.160792529225966 (code B ref 45202); Mon, 14 Dec 2020 05:55:02 +0000 Received: (at 45202) by debbugs.gnu.org; 14 Dec 2020 05:54:52 +0000 Received: from localhost ([127.0.0.1]:50849 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kogot-0006kk-PU for submit@debbugs.gnu.org; Mon, 14 Dec 2020 00:54:52 -0500 Received: from mail-out.m-online.net ([212.18.0.9]:53101) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kogos-0006kb-NV for 45202@debbugs.gnu.org; Mon, 14 Dec 2020 00:54:51 -0500 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4CvVw93rpVz1qtQY; Mon, 14 Dec 2020 06:54:49 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4CvVw9287Hz1tTZQ; Mon, 14 Dec 2020 06:54:49 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id o02I9ktAjeS1; Mon, 14 Dec 2020 06:54:48 +0100 (CET) X-Auth-Info: E+4N7a+ETy4PDZHy9fDNABXR52cb4cLH1Uo0Mwmcp2ssmVWGLBIoc1v0yQTDRAbv Received: from EmacsBook (ppp-93-104-71-75.dynamic.mnet-online.de [93.104.71.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Mon, 14 Dec 2020 06:54:48 +0100 (CET) References: <87o8izhz9h.fsf@mnet-mail.de> <87ft4ak6rr.fsf@nckx> <87im96o881.fsf@mnet-mail.de> <87a6uij588.fsf@nckx> User-agent: mu4e 1.4.13; emacs 27.1 From: Raffael Stocker In-reply-to: <87a6uij588.fsf@nckx> Date: Mon, 14 Dec 2020 06:54:47 +0100 Message-ID: <87k0tlvsns.fsf@mnet-mail.de> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 45202@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.30 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 458FE9404E2 X-Spam-Score: -2.30 X-Migadu-Scanner: scn1.migadu.com X-TUID: OVP/nLt4c0BJ 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