diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-11-16 23:49:08 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-11-16 23:49:08 +0000 |
commit | 17e25b83fa3628079f210143f33253c1340de8d4 (patch) | |
tree | 3371129766f44cfe911f7a2acc45917474de5081 | |
parent | df84611b53fa9255f9f7bc80d6dee571fb6c9dfd (diff) |
errno safety in SIGCHLD handler
-rw-r--r-- | usr.bin/newsyslog/newsyslog.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/newsyslog/newsyslog.c b/usr.bin/newsyslog/newsyslog.c index ab87e856f1c..a3e95297e13 100644 --- a/usr.bin/newsyslog/newsyslog.c +++ b/usr.bin/newsyslog/newsyslog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: newsyslog.c,v 1.37 2001/07/09 07:04:50 deraadt Exp $ */ +/* $OpenBSD: newsyslog.c,v 1.38 2001/11/16 23:49:07 deraadt Exp $ */ /* * Copyright (c) 1999 Todd C. Miller <Todd.Miller@courtesan.com> @@ -88,7 +88,7 @@ provided "as is" without express or implied warranty. */ #ifndef lint -static char rcsid[] = "$OpenBSD: newsyslog.c,v 1.37 2001/07/09 07:04:50 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: newsyslog.c,v 1.38 2001/11/16 23:49:07 deraadt Exp $"; #endif /* not lint */ #ifndef CONF @@ -123,6 +123,7 @@ static char rcsid[] = "$OpenBSD: newsyslog.c,v 1.37 2001/07/09 07:04:50 deraadt #include <fcntl.h> #include <pwd.h> #include <grp.h> +#include <errno.h> #include <unistd.h> #include <err.h> @@ -921,8 +922,10 @@ void child_killer(signum) int signum; { + int save_errno = errno; int status; while (waitpid(-1, &status, WNOHANG) > 0) ; + errno = save_errno; } |