summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorMoritz Jodeit <moritz@cvs.openbsd.org>2007-03-26 19:33:24 +0000
committerMoritz Jodeit <moritz@cvs.openbsd.org>2007-03-26 19:33:24 +0000
commit5d4c30ae5a05b7ec2fd2defb96d9fa9f8976c354 (patch)
treea471415c20136684f103dee4252db1589edd380e /libexec
parente3ef66cdfe512a82630c471fd609d9a532eb59c0 (diff)
Do not log when the slave gets killed because of read()
returning 0. This is normal behavior and should not spam the logs. Noticed by henning@ OK henning@ millert@
Diffstat (limited to 'libexec')
-rw-r--r--libexec/ftpd/monitor.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libexec/ftpd/monitor.c b/libexec/ftpd/monitor.c
index 2177c53ac36..33c288d298c 100644
--- a/libexec/ftpd/monitor.c
+++ b/libexec/ftpd/monitor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: monitor.c,v 1.15 2007/03/01 20:06:27 otto Exp $ */
+/* $OpenBSD: monitor.c,v 1.16 2007/03/26 19:33:23 moritz Exp $ */
/*
* Copyright (c) 2004 Moritz Jodeit <moritz@openbsd.org>
@@ -111,7 +111,7 @@ recv_data(int sock, void *buf, size_t len)
while (len > pos) {
switch (n = read(sock, ptr + pos, len - pos)) {
case 0:
- kill_slave("read failure");
+ kill_slave(NULL);
_exit(0);
/* NOTREACHED */
case -1:
@@ -419,7 +419,9 @@ void
kill_slave(char *reason)
{
if (slave_pid > 0) {
- syslog(LOG_NOTICE, "kill slave %d: %s", slave_pid, reason);
+ if (reason)
+ syslog(LOG_NOTICE, "kill slave %d: %s",
+ slave_pid, reason);
kill(slave_pid, SIGQUIT);
}
}