diff options
author | Leah Neukirchen <leah@vuxu.org> | 2019-08-13 16:24:28 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2019-08-13 16:24:28 +0200 |
commit | 10e7856380fa97e470c77781efdd92ed110632c9 (patch) | |
tree | 765f5490d517a889d207a40a1ea5c7871de7a4dd | |
parent | 4fbb854d95053bab4164c836fa87e2510c4acd5a (diff) | |
download | reap-10e7856380fa97e470c77781efdd92ed110632c9.tar.gz reap-10e7856380fa97e470c77781efdd92ed110632c9.tar.xz reap-10e7856380fa97e470c77781efdd92ed110632c9.zip |
with verbose, say when the slaying starts v0.1
-rw-r--r-- | reap.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/reap.c b/reap.c index f71f320..ce3016c 100644 --- a/reap.c +++ b/reap.c @@ -36,6 +36,8 @@ void start_slaying(int sig) { (void)sig; + if (verbose) + write(2, "reap: slaying\n", 14); // async safe do_slay = 1; } @@ -147,8 +149,10 @@ main(int argc, char *argv[]) { } else if (desc == pid) { exitcode = WEXITSTATUS(wstatus); V("reaped child %ld [status %d]\n", (long)desc, exitcode); - if (!do_wait) + if (!do_wait) { + V("slaying\n"); do_slay = 1; + } } else { V("reaped descendant %ld\n", (long)desc); } |