artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4aededb
)
report signal type before dying; from ian@cygnus.com forwarded by niklas
author
deraadt
<deraadt@openbsd.org>
Sun, 5 May 1996 08:20:25 +0000
(08:20 +0000)
committer
deraadt
<deraadt@openbsd.org>
Sun, 5 May 1996 08:20:25 +0000
(08:20 +0000)
gnu/usr.bin/cvs/src/main.c
patch
|
blob
|
history
diff --git
a/gnu/usr.bin/cvs/src/main.c
b/gnu/usr.bin/cvs/src/main.c
index
0ebd78d
..
2b23258
100644
(file)
--- 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