guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[shepherd] 01/02: Register SIGCHLD handler in (sherpherd) rather than at


From: Ludovic Courtès
Subject: [shepherd] 01/02: Register SIGCHLD handler in (sherpherd) rather than at the top level.
Date: Fri, 25 Nov 2016 23:08:28 +0000 (UTC)

civodul pushed a commit to branch master
in repository shepherd.

commit efa2f45c5f7dc735407381b7b8a83d6c37f828db
Author: Ludovic Courtès <address@hidden>
Date:   Mon Nov 21 22:18:50 2016 +0100

    Register SIGCHLD handler in (sherpherd) rather than at the top level.
    
    * modules/shepherd/service.scm: Move top-level call to 'sigaction' to...
    * modules/shepherd.scm (main): ... here.
---
 modules/shepherd.scm         |    4 ++++
 modules/shepherd/service.scm |    3 ---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/shepherd.scm b/modules/shepherd.scm
index e8bd44f..dd8a076 100644
--- a/modules/shepherd.scm
+++ b/modules/shepherd.scm
@@ -142,6 +142,10 @@
 
     ;; Start the 'root' service.
     (start root-service)
+
+    ;; Install the SIGCHLD handler.
+    (sigaction SIGCHLD respawn-service SA_NOCLDSTOP)
+
     ;; This _must_ succeed.  (We could also put the `catch' around
     ;; `main', but it is often useful to get the backtrace, and
     ;; `caught-error' does not do this yet.)
diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index a62962c..3890675 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -1014,9 +1014,6 @@ otherwise by updating its state."
          ;; loop so we don't miss any terminated child process.
          (loop))))))
 
-;; Install it as the handler.
-(sigaction SIGCHLD respawn-service SA_NOCLDSTOP)
-
 ;; Add NEW-SERVICES to the list of known services.
 (define (register-services . new-services)
   (define (register-single-service new)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]