* [bug#49056] [PATCH] services: pcscd: Fix daemon signal handling.
@ 2021-06-16 6:38 Brice Waegeneire
2021-06-26 20:59 ` Ludovic Courtès
0 siblings, 1 reply; 3+ messages in thread
From: Brice Waegeneire @ 2021-06-16 6:38 UTC (permalink / raw)
To: 49056
"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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [bug#49056] [PATCH] services: pcscd: Fix daemon signal handling.
2021-06-16 6:38 [bug#49056] [PATCH] services: pcscd: Fix daemon signal handling Brice Waegeneire
@ 2021-06-26 20:59 ` Ludovic Courtès
2021-07-03 18:18 ` bug#49056: " Brice Waegeneire
0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2021-06-26 20:59 UTC (permalink / raw)
To: Brice Waegeneire; +Cc: 49056
Hi,
Brice Waegeneire <brice@waegenei.re> skribis:
> "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".
Well done!
> + (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)))
We can probably call ‘fork+exec-command’ directly instead of going
through ‘make-forkexec-constructor’, no?
Otherwise LGTM, thanks!
Ludo’.
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#49056: [PATCH] services: pcscd: Fix daemon signal handling.
2021-06-26 20:59 ` Ludovic Courtès
@ 2021-07-03 18:18 ` Brice Waegeneire
0 siblings, 0 replies; 3+ messages in thread
From: Brice Waegeneire @ 2021-07-03 18:18 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 49056-done
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-03 18:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16 6:38 [bug#49056] [PATCH] services: pcscd: Fix daemon signal handling Brice Waegeneire
2021-06-26 20:59 ` Ludovic Courtès
2021-07-03 18:18 ` bug#49056: " Brice Waegeneire
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).