emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#49056: closed ([PATCH] services: pcscd: Fix daemon signal handling.)


From: GNU bug Tracking System
Subject: bug#49056: closed ([PATCH] services: pcscd: Fix daemon signal handling.)
Date: Sat, 03 Jul 2021 18:19:01 +0000

Your message dated Sat, 03 Jul 2021 20:18:12 +0200
with message-id <87y2anclcr.fsf_-_@waegenei.re>
and subject line Re: bug#49056: [PATCH] services: pcscd: Fix daemon signal 
handling.
has caused the debbugs.gnu.org bug report #49056,
regarding [PATCH] services: pcscd: Fix daemon signal handling.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
49056: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=49056
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] services: pcscd: Fix daemon signal handling. Date: Wed, 16 Jun 2021 08:38:18 +0200
"pcscd" wouldn't handle SIGTERM as it inherited ignoring this
signal (and others) from its parent shepherd.  The constructor
make-forkexec, restore signal handling.  Fixes
<https://issues.guix.gnu.org/45202>.

* gnu/services/security-token.scm (pcscd)[start]: Use
make-fork-exec-constructor to start "pcscd".
---
Depend on patch <https://issues.guix.gnu.org/48987>.

 gnu/services/security-token.scm | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/gnu/services/security-token.scm b/gnu/services/security-token.scm
index 0cbb591e10..822984b70b 100644
--- a/gnu/services/security-token.scm
+++ b/gnu/services/security-token.scm
@@ -57,12 +57,15 @@
         (provision '(pcscd))
         (requirement '(syslogd))
         (modules '((gnu build shepherd)))
-        (start #~(lambda _
+        (start #~(lambda args
                    (let ((socket "/run/pcscd/pcscd.comm"))
                      (when (file-exists? socket)
                        (delete-file socket)))
-                   (invoke #$(file-append pcsc-lite "/sbin/pcscd"))
-                   (call-with-input-file "/run/pcscd/pcscd.pid" read)))
+                   (apply (make-forkexec-constructor
+                           (list #$(file-append pcsc-lite "/sbin/pcscd")
+                                 "--foreground")
+                           #:log-file "/var/log/pcscd.log")
+                          args)))
         (stop #~(make-kill-destructor)))))))
 
 (define pcscd-activation
-- 
2.31.1




--- End Message ---
--- Begin Message --- Subject: Re: bug#49056: [PATCH] services: pcscd: Fix daemon signal handling. Date: Sat, 03 Jul 2021 20:18:12 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Ludovic Courtès <ludo@gnu.org> writes:

> We can probably call ‘fork+exec-command’ directly instead of going
> through ‘make-forkexec-constructor’, no?
>
> Otherwise LGTM, thanks!

Changed to use ‘fork+exec-command’ and pushed as
e789ce538ed848bacb8f4eb5742f78b965ccf57c.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]