From: deraadt Date: Sun, 5 May 1996 08:20:25 +0000 (+0000) Subject: report signal type before dying; from ian@cygnus.com forwarded by niklas X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=67247c7225ac8f4714fa0f258327a859459b3093;p=openbsd report signal type before dying; from ian@cygnus.com forwarded by niklas --- diff --git a/gnu/usr.bin/cvs/src/main.c b/gnu/usr.bin/cvs/src/main.c index 0ebd78da575..2b232585210 100644 --- a/gnu/usr.bin/cvs/src/main.c +++ b/gnu/usr.bin/cvs/src/main.c @@ -220,9 +220,31 @@ static const char *const cmd_usage[] = }; static RETSIGTYPE -main_cleanup () +main_cleanup (sig) + int sig; { - exit (1); + const char *name; + + switch (sig) + { + case SIGHUP: + name = "hangup"; + break; + case SIGINT: + name = "interrupt"; + break; + case SIGQUIT: + name = "quit"; + break; + case SIGPIPE: + name = "broken pipe"; + break; + case SIGTERM: + name = "termination"; + break; + } + + error (1, 0, "received %s signal", name); } static void