guix-commits
[Top][All Lists]
Advanced

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

03/07: daemon: Unregister build hook from the worker's children upon bui


From: guix-commits
Subject: 03/07: daemon: Unregister build hook from the worker's children upon build failure.
Date: Mon, 4 Nov 2019 17:35:42 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit af73beeba1fc9effab60b11aea1d7ed8c24e7367
Author: Ludovic Courtès <address@hidden>
Date:   Mon Nov 4 22:49:49 2019 +0100

    daemon: Unregister build hook from the worker's children upon build failure.
    
    Fixes <https://bugs.gnu.org/38062>.
    This is a followup to ada9a19a2dca74feafcf24df1152abd685d4142f.
    
    * nix/libstore/build.cc (DerivationGoal::killChild): Add conditional
    call to 'worker.childTerminated' for 'hook->pid'.
---
 nix/libstore/build.cc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index 74cd054..c4fc877 100644
--- a/nix/libstore/build.cc
+++ b/nix/libstore/build.cc
@@ -947,6 +947,11 @@ void DerivationGoal::killChild()
         assert(pid == -1);
     }
 
+    /* If there was a build hook involved, remove it from the worker's
+       children.  */
+    if (hook && hook->pid != -1) {
+       worker.childTerminated(hook->pid);
+    }
     hook.reset();
 }
 



reply via email to

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