Module Name: src
Committed By: christos
Date: Thu Jun 20 15:14:03 UTC 2013
Modified Files:
src/external/bsd/dhcp/dist/client: dhclient.c
Log Message:
file descriptor neatness.
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/dhcp/dist/client/dhclient.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/dhcp/dist/client/dhclient.c
diff -u src/external/bsd/dhcp/dist/client/dhclient.c:1.6 src/external/bsd/dhcp/dist/client/dhclient.c:1.7
--- src/external/bsd/dhcp/dist/client/dhclient.c:1.6 Thu Jun 20 08:24:08 2013
+++ src/external/bsd/dhcp/dist/client/dhclient.c Thu Jun 20 11:14:03 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: dhclient.c,v 1.6 2013/06/20 12:24:08 christos Exp $ */
+/* $NetBSD: dhclient.c,v 1.7 2013/06/20 15:14:03 christos Exp $ */
/* dhclient.c
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: dhclient.c,v 1.6 2013/06/20 12:24:08 christos Exp $");
+__RCSID("$NetBSD: dhclient.c,v 1.7 2013/06/20 15:14:03 christos Exp $");
#include "dhcpd.h"
#include <syslog.h>
@@ -894,7 +894,7 @@ int find_subnet (struct subnet **sp,
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: dhclient.c,v 1.6 2013/06/20 12:24:08 christos Exp $");
+__RCSID("$NetBSD: dhclient.c,v 1.7 2013/06/20 15:14:03 christos Exp $");
void state_reboot (cpp)
void *cpp;
@@ -3532,9 +3532,11 @@ void go_daemon (void)
log_fatal ("Can't fork daemon: %m");
else if (pid) {
char c;
+ close(pfd[0]);
read(pfd[1], &c, 1);
exit (0);
- }
+ } else
+ close(pfd[1]);
}
void write_client_pid_file ()