summaryrefslogtreecommitdiffstats
path: root/usr.sbin/syslogd/syslogd.c
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2014-08-31 22:11:43 +0000
committerbluhm <bluhm@openbsd.org>2014-08-31 22:11:43 +0000
commit01d979bae13a0951e5fe2b8b4808a91e174cbe22 (patch)
treef484c8407baff9dcfed8a8d6d4a00d8d25351272 /usr.sbin/syslogd/syslogd.c
parentreplace LRU bufcache with something originally modelled after 2Q. (diff)
downloadwireguard-openbsd-01d979bae13a0951e5fe2b8b4808a91e174cbe22.tar.xz
wireguard-openbsd-01d979bae13a0951e5fe2b8b4808a91e174cbe22.zip
The reapchild() signal handler collects all children. This can be
done easier by ignoring SIGCHLD. OK guenther@
Diffstat (limited to 'usr.sbin/syslogd/syslogd.c')
-rw-r--r--usr.sbin/syslogd/syslogd.c17
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.
*/