summaryrefslogtreecommitdiff
path: root/usr.sbin/lpr/lpd/lpd.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-11-19 20:27:15 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-11-19 20:27:15 +0000
commitd71af8664656628d5d27a8ac59f6a1b1b570387c (patch)
tree017ead60ffd1778430cf29258f175f37d3f7aa0a /usr.sbin/lpr/lpd/lpd.c
parent4348c1eeecc4225e4a2b68d5acceba8696f95715 (diff)
only slight fixes needed in signal handlers
Diffstat (limited to 'usr.sbin/lpr/lpd/lpd.c')
-rw-r--r--usr.sbin/lpr/lpd/lpd.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.sbin/lpr/lpd/lpd.c b/usr.sbin/lpr/lpd/lpd.c
index 7d1833e083c..37e410e1682 100644
--- a/usr.sbin/lpr/lpd/lpd.c
+++ b/usr.sbin/lpr/lpd/lpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lpd.c,v 1.21 2001/09/05 00:22:49 deraadt Exp $ */
+/* $OpenBSD: lpd.c,v 1.22 2001/11/19 20:27:13 deraadt Exp $ */
/* $NetBSD: lpd.c,v 1.7 1996/04/24 14:54:06 mrg Exp $ */
/*
@@ -45,7 +45,7 @@ static const char copyright[] =
#if 0
static const char sccsid[] = "@(#)lpd.c 8.7 (Berkeley) 5/10/95";
#else
-static const char rcsid[] = "$OpenBSD: lpd.c,v 1.21 2001/09/05 00:22:49 deraadt Exp $";
+static const char rcsid[] = "$OpenBSD: lpd.c,v 1.22 2001/11/19 20:27:13 deraadt Exp $";
#endif
#endif /* not lint */
@@ -317,8 +317,8 @@ static void
reapchild(signo)
int signo;
{
- int status;
int save_errno = errno;
+ int status;
while (waitpid((pid_t)-1, &status, WNOHANG) > 0)
;
@@ -329,10 +329,12 @@ static void
mcleanup(signo)
int signo;
{
+ struct syslog_data sdata = SYSLOG_DATA_INIT;
+
if (lflag)
- syslog(LOG_INFO, "exiting");
+ syslog_r(LOG_INFO, &sdata, "exiting");
unlink(_PATH_SOCKETNAME);
- exit(0);
+ _exit(0);
}
/*