diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-08-17 22:00:33 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-08-17 22:00:33 +0000 |
commit | 12c3da886b6543c565a951031a86db3853055b77 (patch) | |
tree | 87d2ae70d74ac8440b378e67676b93a55a483472 /usr.sbin/syslogd/syslogd.c | |
parent | a41b696354f727bffafc9e878dfa7ea42783243c (diff) |
do the save_errno thing, but other races still exist in here
Diffstat (limited to 'usr.sbin/syslogd/syslogd.c')
-rw-r--r-- | usr.sbin/syslogd/syslogd.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 13032c06ce5..e263de0fe5a 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syslogd.c,v 1.34 2000/02/22 19:28:06 deraadt Exp $ */ +/* $OpenBSD: syslogd.c,v 1.35 2000/08/17 22:00:32 deraadt Exp $ */ /* * Copyright (c) 1983, 1988, 1993, 1994 @@ -43,7 +43,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; #else -static char rcsid[] = "$OpenBSD: syslogd.c,v 1.34 2000/02/22 19:28:06 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: syslogd.c,v 1.35 2000/08/17 22:00:32 deraadt Exp $"; #endif #endif /* not lint */ @@ -884,6 +884,7 @@ domark(signo) int signo; { struct filed *f; + int save_errno = errno; now = time((time_t *)NULL); MarkSeq += TIMERINTVL; @@ -902,6 +903,7 @@ domark(signo) } } (void)alarm(TIMERINTVL); + errno = save_errno; } /* @@ -964,6 +966,7 @@ init(signo) char *p; char cline[LINE_MAX]; char prog[NAME_MAX+1]; + int save_errno = errno; dprintf("init\n"); @@ -1001,6 +1004,7 @@ init(signo) (*nextp)->f_next = (struct filed *)calloc(1, sizeof(*f)); cfline("*.PANIC\t*", (*nextp)->f_next, "*"); Initialized = 1; + errno = save_errno; return; } @@ -1088,8 +1092,10 @@ init(signo) } } - logmsg(LOG_SYSLOG|LOG_INFO, "syslogd: restart", LocalHostName, ADDDATE); + logmsg(LOG_SYSLOG|LOG_INFO, "syslogd: restart", LocalHostName, + ADDDATE); dprintf("syslogd: restarted\n"); + errno = save_errno; } /* |