diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2014-08-31 22:11:44 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2014-08-31 22:11:44 +0000 |
commit | 642aaa11314d00ca82adaff8a33311fbe3dc6fa5 (patch) | |
tree | b4b806abff05f1b1b5f4b81fc8f4f8a8d77b3ffd /usr.sbin/syslogd | |
parent | 579dcf1c8b87926a3ab6438ba522dd9984e3a13a (diff) |
The reapchild() signal handler collects all children. This can be
done easier by ignoring SIGCHLD.
OK guenther@
Diffstat (limited to 'usr.sbin/syslogd')
-rw-r--r-- | usr.sbin/syslogd/syslogd.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 7a8b1c25f74..03b8f6a7deb 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syslogd.c,v 1.120 2014/08/31 20:51:31 bluhm Exp $ */ +/* $OpenBSD: syslogd.c,v 1.121 2014/08/31 22:11:43 bluhm Exp $ */ /* * Copyright (c) 1983, 1988, 1993, 1994 @@ -266,7 +266,6 @@ void logmsg(int, char *, char *, int); struct filed *find_dup(struct filed *); void printline(char *, char *); void printsys(char *); -void reapchild(int); char *ttymsg(struct iovec *, int, char *, int); void usage(void); void wallmsg(struct filed *, struct iovec *); @@ -553,7 +552,7 @@ main(int argc, char *argv[]) (void)signal(SIGTERM, dodie); (void)signal(SIGINT, Debug ? dodie : SIG_IGN); (void)signal(SIGQUIT, Debug ? dodie : SIG_IGN); - (void)signal(SIGCHLD, reapchild); + (void)signal(SIGCHLD, SIG_IGN); (void)signal(SIGALRM, domark); (void)signal(SIGPIPE, SIG_IGN); (void)alarm(TIMERINTVL); @@ -1119,18 +1118,6 @@ wallmsg(struct filed *f, struct iovec *iov) reenter = 0; } -/* ARGSUSED */ -void -reapchild(int signo) -{ - int save_errno = errno; - int status; - - while (waitpid(-1, &status, WNOHANG) > 0) - ; - errno = save_errno; -} - /* * Return a printable representation of a host address. */ |