[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
85/118: Get rid of "killing <pid>" message for unused build hooks
From: |
Ludovic Courtès |
Subject: |
85/118: Get rid of "killing <pid>" message for unused build hooks |
Date: |
Tue, 19 May 2015 14:45:51 +0000 |
civodul pushed a commit to branch nix
in repository guix.
commit 75f746f018e34868b8057bed87c90d2cbe2c0b6c
Author: Eelco Dolstra <address@hidden>
Date: Mon Aug 4 17:27:45 2014 +0200
Get rid of "killing <pid>" message for unused build hooks
---
nix/libstore/build.cc | 2 +-
nix/libutil/util.cc | 5 +++--
nix/libutil/util.hh | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index e6f7c56..9b9f3d2 100644
--- a/nix/libstore/build.cc
+++ b/nix/libstore/build.cc
@@ -635,7 +635,7 @@ HookInstance::HookInstance()
HookInstance::~HookInstance()
{
try {
- pid.kill();
+ pid.kill(true);
} catch (...) {
ignoreException();
}
diff --git a/nix/libutil/util.cc b/nix/libutil/util.cc
index b792120..22f49f7 100644
--- a/nix/libutil/util.cc
+++ b/nix/libutil/util.cc
@@ -740,11 +740,12 @@ Pid::operator pid_t()
}
-void Pid::kill()
+void Pid::kill(bool quiet)
{
if (pid == -1 || pid == 0) return;
- printMsg(lvlError, format("killing process %1%") % pid);
+ if (!quiet)
+ printMsg(lvlError, format("killing process %1%") % pid);
/* Send the requested signal to the child. If it has its own
process group, send the signal to every process in the child
diff --git a/nix/libutil/util.hh b/nix/libutil/util.hh
index cf513c0..7e538ea 100644
--- a/nix/libutil/util.hh
+++ b/nix/libutil/util.hh
@@ -253,7 +253,7 @@ public:
~Pid();
void operator =(pid_t pid);
operator pid_t();
- void kill();
+ void kill(bool quiet = false);
int wait(bool block);
void setSeparatePG(bool separatePG);
void setKillSignal(int signal);
- 74/118: Merge commit '8e9140cfdef9dbd1eb61e4c75c91d452ab5e4a74' into nix, (continued)
- 74/118: Merge commit '8e9140cfdef9dbd1eb61e4c75c91d452ab5e4a74' into nix, Ludovic Courtès, 2015/05/19
- 73/118: startProcess: Make writing error messages from the child more robust, Ludovic Courtès, 2015/05/19
- 69/118: Bump, Ludovic Courtès, 2015/05/19
- 86/118: Add option ‘build-extra-chroot-dirs’, Ludovic Courtès, 2015/05/19
- 76/118: nix-daemon: Simplify stderr handling, Ludovic Courtès, 2015/05/19
- 77/118: nix-daemon: Less verbosity, Ludovic Courtès, 2015/05/19
- 90/118: Remove unnecessary call to addTempRoot(), Ludovic Courtès, 2015/05/19
- 88/118: Move some options out of globals, Ludovic Courtès, 2015/05/19
- 83/118: Call commonChildInit() before doing chroot init, Ludovic Courtès, 2015/05/19
- 84/118: Remove ugly hack for detecting build environment setup errors, Ludovic Courtès, 2015/05/19
- 85/118: Get rid of "killing <pid>" message for unused build hooks,
Ludovic Courtès <=
- 93/118: Reduce verbosity, Ludovic Courtès, 2015/05/19
- 92/118: Propagate remote timeouts properly, Ludovic Courtès, 2015/05/19
- 87/118: Refactor, Ludovic Courtès, 2015/05/19
- 79/118: Allow regular files as GC roots, Ludovic Courtès, 2015/05/19
- 89/118: Doh, Ludovic Courtès, 2015/05/19
- 78/118: Remove some dead code, Ludovic Courtès, 2015/05/19
- 82/118: Eliminate redundant copy, Ludovic Courtès, 2015/05/19
- 95/118: Make hook shutdown more reliable, Ludovic Courtès, 2015/05/19
- 81/118: findRoots(): Prevent a call to lstat(), Ludovic Courtès, 2015/05/19
- 101/118: On Linux, disable address space randomization, Ludovic Courtès, 2015/05/19