[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[shepherd] 01/06: service: 'check-for-dead-services' uses 'catch-system-
From: |
Ludovic Courtès |
Subject: |
[shepherd] 01/06: service: 'check-for-dead-services' uses 'catch-system-error'. |
Date: |
Sat, 18 Apr 2020 11:13:44 -0400 (EDT) |
civodul pushed a commit to branch master
in repository shepherd.
commit 09a82355df2dea302a20a19e205460c89dd2af45
Author: Ludovic Courtès <address@hidden>
AuthorDate: Sat Apr 18 15:30:22 2020 +0200
service: 'check-for-dead-services' uses 'catch-system-error'.
* modules/shepherd/service.scm (check-for-dead-services)[process-exists?]:
Use 'catch-system-error' instead of 'catch #t'.
---
modules/shepherd/service.scm | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index 88b5c07..6d87c17 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -1274,9 +1274,8 @@ file when persistence is enabled."
unexpectedly stopped running. This procedure is used as a fallback on systems
where prctl/PR_SET_CHILD_SUBREAPER is unsupported."
(define (process-exists? pid)
- (catch #t
- (lambda () (kill pid 0) #t)
- (lambda _ #f)))
+ (catch-system-error (kill pid 0) #t))
+
(for-each-service (lambda (service)
(let ((running (slot-ref service 'running)))
(when (and (integer? running)
- [shepherd] branch master updated (6b0e1e1 -> b5c164b), Ludovic Courtès, 2020/04/18
- [shepherd] 03/06: system: Add 'getpgid'., Ludovic Courtès, 2020/04/18
- [shepherd] 01/06: service: 'check-for-dead-services' uses 'catch-system-error'.,
Ludovic Courtès <=
- [shepherd] 04/06: service: 'make-kill-destructor' kills the process group., Ludovic Courtès, 2020/04/18
- [shepherd] 05/06: service: Introduce 'default-pid-file-timeout'., Ludovic Courtès, 2020/04/18
- [shepherd] 02/06: service: Terminate the progress group when the PID file doesn't show up., Ludovic Courtès, 2020/04/18
- [shepherd] 06/06: service: 'make-forkexec-constructor' no longer supports the 0.1 form., Ludovic Courtès, 2020/04/18