all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Brice Waegeneire <brice@waegenei.re>
To: 48987@debbugs.gnu.org
Subject: [bug#48987] [PATCH] services: pcscd: Cleanup socket when started.
Date: Sat, 12 Jun 2021 23:24:58 +0200	[thread overview]
Message-ID: <20210612212458.13456-1-brice@waegenei.re> (raw)

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





             reply	other threads:[~2021-06-12 21:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-12 21:24 Brice Waegeneire [this message]
2021-06-16 20:54 ` [bug#48987] [PATCH] services: pcscd: Cleanup socket when started Ludovic Courtès
2021-06-19 21:50   ` bug#48987: " Brice Waegeneire

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210612212458.13456-1-brice@waegenei.re \
    --to=brice@waegenei.re \
    --cc=48987@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.