diff --git a/util/ack/main.c b/util/ack/main.c index 9020e186c..269e6a571 100644 --- a/util/ack/main.c +++ b/util/ack/main.c @@ -21,7 +21,6 @@ static char rcs_id[] = "$Id$"; static char rcs_ack[] = RCS_ACK; #endif -static int sigs[] = { SIGINT, SIGHUP, SIGTERM, 0 }; static int arg_count; static char* srcvar(void); @@ -85,13 +84,8 @@ int main(int argc, char** argv) if (n_error && !k_flag) exit(n_error); - for (n_sig = sigs; *n_sig; n_sig++) - { - if (signal(*n_sig, noodstop) == SIG_IGN) - { - signal(*n_sig, SIG_IGN); - } - } + if (signal(SIGINT, noodstop) == SIG_IGN) + signal(SIGINT, SIG_IGN); scanlist(l_first(arguments), elem) { diff --git a/util/ack/run.c b/util/ack/run.c index dced2d5d2..d1c4fe730 100644 --- a/util/ack/run.c +++ b/util/ack/run.c @@ -179,18 +179,9 @@ static int run_exec(trf* phase, const char* prog) if (status) { - switch (status & 0177) - { - case 0: - break; - case SIGHUP: - case SIGINT: - case SIGQUIT: - case SIGTERM: - quit(-5); - default: - error("%s died with signal %d", prog, status & 0177); - } + if (status & 0177) + error("%s died with signal %d", prog, status & 0177); + /* The assumption is that processes voluntarely dying with a non-zero status already produced some sort of error message to the outside world.