[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[shepherd] 03/07: shepherd: Don't fail if the socket file has already be
From: |
Ludovic Courtès |
Subject: |
[shepherd] 03/07: shepherd: Don't fail if the socket file has already been removed. |
Date: |
Thu, 18 Apr 2019 06:25:27 -0400 (EDT) |
civodul pushed a commit to branch master
in repository shepherd.
commit 352c2434a925a3e90f0593d9ad0e42b0bd82eddc
Author: Ludovic Courtès <address@hidden>
Date: Thu Apr 18 11:39:47 2019 +0200
shepherd: Don't fail if the socket file has already been removed.
This is a followup to f260b2f90ed9ea9a1529e5a58db8df3a886d9c10.
In the test suite, for example, we'd usually explicitly remove the
socket file, possibly before 'shepherd' has exited. This would cause a
'system-error' exception when 'shepherd' tries to delete it.
* modules/shepherd.scm (call-with-server-socket): Wrap 'delete-file'
call in 'catch-system-error'.
---
modules/shepherd.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/shepherd.scm b/modules/shepherd.scm
index 8b05fb5..8b2cc1d 100644
--- a/modules/shepherd.scm
+++ b/modules/shepherd.scm
@@ -58,7 +58,7 @@ socket file at FILE-NAME upon exit of PROC. Return the
values of PROC."
(lambda () (proc sock))
(lambda ()
(close sock)
- (delete-file file-name)))))
+ (catch-system-error (delete-file file-name))))))
;; Main program.
- [shepherd] branch master updated (f260b2f -> 6bb5bdf), Ludovic Courtès, 2019/04/18
- [shepherd] 05/07: support: Update copyright year in '--version' output., Ludovic Courtès, 2019/04/18
- [shepherd] 01/07: herd: Add comment about confusing message., Ludovic Courtès, 2019/04/18
- [shepherd] 07/07: Ignore tests/*.log and tests/*.trs., Ludovic Courtès, 2019/04/18
- [shepherd] 02/07: 'report-error' now translates messages., Ludovic Courtès, 2019/04/18
- [shepherd] 03/07: shepherd: Don't fail if the socket file has already been removed.,
Ludovic Courtès <=
- [shepherd] 04/07: service: Add one-shot services., Ludovic Courtès, 2019/04/18
- [shepherd] 06/07: support: Improve i18n for the '--version' output., Ludovic Courtès, 2019/04/18