cb8af26bb1
PR: 181765 Submitted by: uffe ================================================================= daemontools-encore is a collection of tools for managing UNIX services. It is derived from the public-domain release of daemontools by D. J. Bernstein. daemontools-encore adds numerous enhancements above what daemontools could do while maintaining backwards compatibility with daemontools. See the CHANGES file for more details on what features have been added.
33 lines
1.2 KiB
Diff
33 lines
1.2 KiB
Diff
--- sleeper.c.orig 2014-07-27 23:16:55.000000000 +0200
|
|
+++ sleeper.c 2014-07-27 23:18:11.000000000 +0200
|
|
@@ -8,20 +8,18 @@
|
|
const char *name;
|
|
int ignored;
|
|
switch (sig) {
|
|
- case SIGALRM: name = "ALRM"; break;
|
|
- case SIGCONT: name = "CONT"; break;
|
|
- case SIGHUP: name = "HUP"; break;
|
|
- case SIGINT: name = "INT"; break;
|
|
- case SIGQUIT: name = "QUIT"; break;
|
|
- case SIGTERM: name = "TERM"; break;
|
|
- case SIGUSR1: name = "USR1"; break;
|
|
- case SIGUSR2: name = "USR2"; break;
|
|
- case SIGWINCH: name = "WINCH"; break;
|
|
- default: name = "unknown signal";
|
|
+ case SIGALRM: name = "Caught ALRM\n"; break;
|
|
+ case SIGCONT: name = "Caught CONT\n"; break;
|
|
+ case SIGHUP: name = "Caught HUP\n"; break;
|
|
+ case SIGINT: name = "Caught INT\n"; break;
|
|
+ case SIGQUIT: name = "Caught QUIT\n"; break;
|
|
+ case SIGTERM: name = "Caught TERM\n"; break;
|
|
+ case SIGUSR1: name = "Caught USR1\n"; break;
|
|
+ case SIGUSR2: name = "Caught USR2\n"; break;
|
|
+ case SIGWINCH: name = "Caught WINCH\n"; break;
|
|
+ default: name = "unknown signal\n";
|
|
}
|
|
- ignored = write(1, "Caught ", 7);
|
|
ignored = write(1, name, str_len(name));
|
|
- ignored = write(1, "\n", 1);
|
|
if (sig != SIGCONT)
|
|
_exit(1);
|
|
}
|