From e789ce538ed848bacb8f4eb5742f78b965ccf57c Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Tue, 15 Jun 2021 23:24:30 +0200 Subject: 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 . * gnu/services/security-token.scm (pcscd)[start]: Use fork+exec-command to start "pcscd". --- gnu/services/security-token.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gnu/services') 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 -- cgit v1.2.3