summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-03-01 09:38:41 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-03-01 09:38:41 +0000
commita2a6bc6282504d91dc747b2b758937df9fa8e2ad (patch)
tree1db2a5353753ec2e85456f94b8f98e5fe8177e71
parent38cc35685df65aa6573b5c25077878d009a6cfba (diff)
use sigset_t all over the place
-rw-r--r--usr.sbin/syslogd/syslogd.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index a01e6ca3036..e0d756a7a33 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -513,14 +513,18 @@ logmsg(pri, msg, from, flags)
int flags;
{
struct filed *f;
- int fac, msglen, omask, prilev, i;
+ int fac, msglen, prilev, i;
+ sigset_t mask, omask;
char *timestamp;
char prog[NAME_MAX+1];
dprintf("logmsg: pri 0%o, flags 0x%x, from %s, msg %s\n",
pri, flags, from, msg);
- omask = sigblock(sigmask(SIGHUP)|sigmask(SIGALRM));
+ sigemptyset(&mask);
+ sigaddset(&mask, SIGALRM);
+ sigaddset(&mask, SIGHUP);
+ sigprocmask(SIG_BLOCK, &mask, &omask);
/*
* Check to see if msg looks non-standard.
@@ -564,7 +568,7 @@ logmsg(pri, msg, from, flags)
(void)close(f->f_file);
f->f_file = -1;
}
- (void)sigsetmask(omask);
+ (void)sigprocmask(SIG_SETMASK, &omask, NULL);
return;
}
for (f = Files; f; f = f->f_next) {
@@ -626,7 +630,7 @@ logmsg(pri, msg, from, flags)
}
}
}
- (void)sigsetmask(omask);
+ (void)sigprocmask(SIG_SETMASK, &omask, NULL);
}
void