summary refs log tree commit diff
path: root/gnu/services
diff options
context:
space:
mode:
authorBrice Waegeneire <brice@waegenei.re>2021-06-15 23:24:30 +0200
committerBrice Waegeneire <brice@waegenei.re>2021-07-03 20:13:42 +0200
commite789ce538ed848bacb8f4eb5742f78b965ccf57c (patch)
tree1510c1bf181bfdac910c06f7c23ba4bec5e24159 /gnu/services
parent9c1720591caf8fafa8e4336a291b9b47c2ddc7e2 (diff)
downloadguix-e789ce538ed848bacb8f4eb5742f78b965ccf57c.tar.gz
services: pcscd: Fix daemon signal handling.
"pcscd" wouldn't handle SIGTERM as it inherit ignoring this signal (and
others) from its parent shepherd; fork+exec-command restore signal
handling.  Fixes <https://issues.guix.gnu.org/45202>.

* gnu/services/security-token.scm (pcscd)[start]: Use
fork+exec-command to start "pcscd".
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/security-token.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/gnu/services/security-token.scm b/gnu/services/security-token.scm
index 0cbb591e10..52afad84a6 100644
--- a/gnu/services/security-token.scm
+++ b/gnu/services/security-token.scm
@@ -61,8 +61,10 @@
                    (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)))
+                   (fork+exec-command
+                    (list #$(file-append pcsc-lite "/sbin/pcscd")
+                          "--foreground")
+                    #:log-file "/var/log/pcscd.log")))
         (stop #~(make-kill-destructor)))))))
 
 (define pcscd-activation