guix-patches
[Top][All Lists]
Advanced

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

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


From: Ludovic Courtès
Subject: [bug#49056] [PATCH] services: pcscd: Fix daemon signal handling.
Date: Sat, 26 Jun 2021 22:59:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

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’.





reply via email to

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