[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
111/376: Get rid of "killing <pid>" message for unused build hooks
From: |
Ludovic Courtès |
Subject: |
111/376: Get rid of "killing <pid>" message for unused build hooks |
Date: |
Wed, 28 Jan 2015 22:04:23 +0000 |
civodul pushed a commit to tag 1.8
in repository guix.
commit 4d73e2e893850d032770373b026854228c61dc8e
Author: Eelco Dolstra <address@hidden>
Date: Mon Aug 4 17:27:45 2014 +0200
Get rid of "killing <pid>" message for unused build hooks
---
src/libstore/build.cc | 2 +-
src/libutil/util.cc | 5 +++--
src/libutil/util.hh | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index d73504a..e3d96d9 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -623,7 +623,7 @@ HookInstance::HookInstance()
HookInstance::~HookInstance()
{
try {
- pid.kill();
+ pid.kill(true);
} catch (...) {
ignoreException();
}
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 44087d5..ed283fb 100644
--- a/src/libutil/util.cc
+++ b/src/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/src/libutil/util.hh b/src/libutil/util.hh
index ade52c3..5f2d953 100644
--- a/src/libutil/util.hh
+++ b/src/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);
- 110/376: Make chroot builds easier to set up, (continued)
- 110/376: Make chroot builds easier to set up, Ludovic Courtès, 2015/01/28
- 109/376: Speed up nix-shell, Ludovic Courtès, 2015/01/28
- 121/376: nix-install-package: Use extra-binary-caches, Ludovic Courtès, 2015/01/28
- 119/376: Add support for order-only dependencies, Ludovic Courtès, 2015/01/28
- 118/376: install-nix-from-closure.sh: Use https channel if possible, Ludovic Courtès, 2015/01/28
- 114/376: Refactor, Ludovic Courtès, 2015/01/28
- 117/376: Remove unnecessary call to addTempRoot(), Ludovic Courtès, 2015/01/28
- 115/376: Move some options out of globals, Ludovic Courtès, 2015/01/28
- 116/376: Doh, Ludovic Courtès, 2015/01/28
- 112/376: Add option ‘build-extra-chroot-dirs’, Ludovic Courtès, 2015/01/28
- 111/376: Get rid of "killing <pid>" message for unused build hooks,
Ludovic Courtès <=
- 129/376: Remove log2html.xsl and friends, Ludovic Courtès, 2015/01/28
- 122/376: Warn about untrusted binary caches in extra-binary-caches, Ludovic Courtès, 2015/01/28
- 113/376: Update manual, Ludovic Courtès, 2015/01/28
- 126/376: Handle compound single dash options properly, Ludovic Courtès, 2015/01/28
- 124/376: Fix warning about non-existant -I directories, Ludovic Courtès, 2015/01/28
- 127/376: Use regular file GC roots if possible, Ludovic Courtès, 2015/01/28
- 128/376: nix-log2xml: Handle UTF-8 characters, Ludovic Courtès, 2015/01/28
- 132/376: nix-shell: Use $XDG_RUNTIME_DIR, Ludovic Courtès, 2015/01/28
- 120/376: download-from-binary-cache.pl: Respect $SSL_CERT_FILE, Ludovic Courtès, 2015/01/28
- 123/376: Remove pointless NIX_LOG_TYPE environment variable, Ludovic Courtès, 2015/01/28