[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[shepherd] 04/05: comm: Send clients the 'one-shot?' property when it is
From: |
Ludovic Courtès |
Subject: |
[shepherd] 04/05: comm: Send clients the 'one-shot?' property when it is true. |
Date: |
Wed, 8 May 2019 10:24:37 -0400 (EDT) |
civodul pushed a commit to branch master
in repository shepherd.
commit ce2e4c3590411ac625f44435d26118f9bacee7fa
Author: Ludovic Courtès <address@hidden>
Date: Wed May 8 16:18:29 2019 +0200
comm: Send clients the 'one-shot?' property when it is true.
* modules/shepherd/service.scm (service->sexp): Send the 'one-shot?'
property when SERVICE is one-shot.
---
modules/shepherd/service.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index 9e031a4..8401cfd 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -562,7 +562,10 @@ clients."
(enabled? ,(enabled? service))
(running ,(result->sexp (slot-ref service 'running)))
(conflicts ,(map canonical-name (conflicts-with service)))
- (last-respawns ,(slot-ref service 'last-respawns))))
+ (last-respawns ,(slot-ref service 'last-respawns))
+ ,@(if (slot-ref service 'one-shot?)
+ '((one-shot? #t))
+ '())))
(define-method (result->sexp (service <service>))
;; Serialize SERVICE to an sexp.