Remove signals.

This commit is contained in:
David Given 2022-07-16 23:52:41 +02:00
parent d0860c12c0
commit 44fc125b1a

View file

@ -44,9 +44,6 @@ main(int argc, char **argv)
{ {
char *p; char *p;
int i; int i;
static char sigs[] = {
SIGHUP, SIGINT, SIGQUIT, SIGTERM, 0
};
/* the next test should be performed by the /* the next test should be performed by the
* preprocessor, but it cannot, so it is performed by the compiler. * preprocessor, but it cannot, so it is performed by the compiler.
@ -58,9 +55,8 @@ main(int argc, char **argv)
} }
progname = *argv++; argc--; progname = *argv++; argc--;
for (p = sigs; (i = *p++) != 0; ) if (signal(SIGINT, SIG_IGN) != SIG_IGN)
if (signal(i, SIG_IGN) != SIG_IGN) signal(SIGINT, stop_on_signal);
signal(i, stop_on_signal);
for (i = 0; i < argc; i++) { for (i = 0; i < argc; i++) {
p = argv[i]; p = argv[i];
if (*p++ != '-') if (*p++ != '-')