* [bug#48987] [PATCH] services: pcscd: Cleanup socket when started.
@ 2021-06-12 21:24 Brice Waegeneire
2021-06-16 20:54 ` Ludovic Courtès
0 siblings, 1 reply; 3+ messages in thread
From: Brice Waegeneire @ 2021-06-12 21:24 UTC (permalink / raw)
To: 48987
Otherwise when pcscd doesn't terminate properly (ie. receive a SIGKILL),
it won't start again because of it's socket already existing.
* gnu/services/security-token.scm (pcscd-shepherd-service)[start]:
Remove existing socket file.
---
gnu/services/security-token.scm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gnu/services/security-token.scm b/gnu/services/security-token.scm
index ec26006538..0cbb591e10 100644
--- a/gnu/services/security-token.scm
+++ b/gnu/services/security-token.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -57,6 +58,9 @@
(requirement '(syslogd))
(modules '((gnu build shepherd)))
(start #~(lambda _
+ (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)))
(stop #~(make-kill-destructor)))))))
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [bug#48987] [PATCH] services: pcscd: Cleanup socket when started.
2021-06-12 21:24 [bug#48987] [PATCH] services: pcscd: Cleanup socket when started Brice Waegeneire
@ 2021-06-16 20:54 ` Ludovic Courtès
2021-06-19 21:50 ` bug#48987: " Brice Waegeneire
0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2021-06-16 20:54 UTC (permalink / raw)
To: Brice Waegeneire; +Cc: 48987
Hi,
Brice Waegeneire <brice@waegenei.re> skribis:
> Otherwise when pcscd doesn't terminate properly (ie. receive a SIGKILL),
> it won't start again because of it's socket already existing.
>
> * gnu/services/security-token.scm (pcscd-shepherd-service)[start]:
> Remove existing socket file.
LGTM, thanks!
Ludo’.
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#48987: [PATCH] services: pcscd: Cleanup socket when started.
2021-06-16 20:54 ` Ludovic Courtès
@ 2021-06-19 21:50 ` Brice Waegeneire
0 siblings, 0 replies; 3+ messages in thread
From: Brice Waegeneire @ 2021-06-19 21:50 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 48987-done
Ludo',
Ludovic Courtès <ludo@gnu.org> writes:
> Brice Waegeneire <brice@waegenei.re> skribis:
>
>> * gnu/services/security-token.scm (pcscd-shepherd-service)[start]:
>> Remove existing socket file.
>
> LGTM, thanks!
Pushed as 4bed8486d4c0a4ff142903b8bc1584ce84767355.
Cheers,
- Brice
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-19 21:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-12 21:24 [bug#48987] [PATCH] services: pcscd: Cleanup socket when started Brice Waegeneire
2021-06-16 20:54 ` Ludovic Courtès
2021-06-19 21:50 ` bug#48987: " 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).