[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[shepherd] 04/06: comm: 'open-server-socket' deletes the file before bin
From: |
Ludovic Courtès |
Subject: |
[shepherd] 04/06: comm: 'open-server-socket' deletes the file before binding. |
Date: |
Mon, 12 Jun 2023 09:39:21 -0400 (EDT) |
civodul pushed a commit to branch master
in repository shepherd.
commit 6d91d512551b05a430e5e2a695aa6c0fddcb0584
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun Jun 11 11:29:47 2023 +0200
comm: 'open-server-socket' deletes the file before binding.
Partly fixes <https://issues.guix.gnu.org/63921>.
* modules/shepherd/comm.scm (open-server-socket): Delete FILE-NAME
before calling 'bind'.
---
modules/shepherd/comm.scm | 1 +
1 file changed, 1 insertion(+)
diff --git a/modules/shepherd/comm.scm b/modules/shepherd/comm.scm
index d6f259d..665124e 100644
--- a/modules/shepherd/comm.scm
+++ b/modules/shepherd/comm.scm
@@ -108,6 +108,7 @@ return the socket."
(logior SOCK_STREAM SOCK_NONBLOCK SOCK_CLOEXEC)
0))
(address (make-socket-address AF_UNIX file-name)))
+ (catch-system-error (delete-file file-name))
(bind sock address)
(listen sock 10)
sock)))
- [shepherd] branch master updated (0703196 -> 24c9640), Ludovic Courtès, 2023/06/12
- [shepherd] 04/06: comm: 'open-server-socket' deletes the file before binding.,
Ludovic Courtès <=
- [shepherd] 02/06: shepherd: Spawn signal-handling fiber early on., Ludovic Courtès, 2023/06/12
- [shepherd] 01/06: service: 'service' errors out when 'provision' is invalid., Ludovic Courtès, 2023/06/12
- [shepherd] 03/06: shepherd: Simplify 'call-with-server-socket'., Ludovic Courtès, 2023/06/12
- [shepherd] 05/06: service: Add 'respawn-limit' slot to <service>., Ludovic Courtès, 2023/06/12
- [shepherd] 06/06: shepherd: Load config asynchronously and gracefully handle errors., Ludovic Courtès, 2023/06/12