diff options
author | Leah Neukirchen <leah@vuxu.org> | 2022-04-12 19:00:29 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2022-04-12 19:00:29 +0200 |
commit | c5553788bd572ef7b42c21524b602cda2cbb339a (patch) | |
tree | ef789c42818e042ff59d8572a628fddf4c30b811 | |
parent | 0e68d09804fb9ec82af37045fb37c2ceefa391d5 (diff) | |
download | reap-master.tar.gz reap-master.tar.xz reap-master.zip |
-rw-r--r-- | reap.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/reap.c b/reap.c index 36e3884..94ed3bd 100644 --- a/reap.c +++ b/reap.c @@ -37,9 +37,15 @@ void start_slaying(int sig) { (void)sig; + + int old_errno = errno; + if (verbose) - write(2, "reap: slaying\n", 14); // async safe + write(2, "reap: slaying\n", 14); + do_slay = 1; + + errno = old_errno; } // needs CONFIG_PROC_CHILDREN=y (since Linux 4.2), most modern distros have this |