From b0f78b272c97b7cc3ff1fbe6c48fd2151d039613 Mon Sep 17 00:00:00 2001 From: John Denker Date: Sun, 15 Jul 2012 05:35:46 -0700 Subject: more complete implementation, including test fixtures --- tools/hi-q.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'tools/hi-q.c') 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 -- cgit v1.2.3