diff options
-rw-r--r-- | gnu/usr.bin/cvs/src/main.c | 26 |
1 files changed, 24 insertions, 2 deletions
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 |