summaryrefslogtreecommitdiff
path: root/tools/hi-q.c
diff options
context:
space:
mode:
authorJohn Denker <jsd@av8n.com>2012-07-15 12:35:46 (GMT)
committerJohn Denker <jsd@av8n.com>2012-07-15 12:35:46 (GMT)
commitb0f78b272c97b7cc3ff1fbe6c48fd2151d039613 (patch)
tree09c46bbacbc71a7ff86af98ccd50fc0aedffb829 /tools/hi-q.c
parentf96288efc416089567dac7bcfa674b1cd6931c97 (diff)
more complete implementation, including test fixtures
Diffstat (limited to 'tools/hi-q.c')
-rw-r--r--tools/hi-q.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/hi-q.c b/tools/hi-q.c
index 8107e27..914bb57 100644
--- a/tools/hi-q.c
+++ b/tools/hi-q.c
@@ -433,11 +433,13 @@ int main(int argc, char** argv) {
break; // kidstatus==0 means clean exit;
// go check other kids
} else if (WIFSIGNALED(kidstatus)) {
- cerr << "hi-q says: kid " << ii
- << " i.e. '" << filter[ii][0] << "'"
- << " was killed by signal: " << WTERMSIG(kidstatus)
+ int sig = WTERMSIG(kidstatus);
+ cerr << "hi-q says: kid " << ii
+ << " == " << kidpid[ii]
+ << " == '" << filter[ii][0] << "'"
+ << " was killed by signal " << sig
<< endl;
-
+ if (sig == SIGUSR1) exit(ex_spam);
panic(ex_syserr); // any kill, not a normal exit
} else {
// some status change other than exit or kill