Page MenuHomeFreeBSD

D13603.diff
No OneTemporary

D13603.diff

Index: head/sbin/dhclient/dhclient.c
===================================================================
--- head/sbin/dhclient/dhclient.c
+++ head/sbin/dhclient/dhclient.c
@@ -2430,7 +2430,7 @@
/* Stop logging to stderr... */
log_perror = 0;
- if (daemon(1, 1) == -1)
+ if (daemonfd(-1, nullfd) == -1)
error("daemon");
cap_rights_init(&rights);
@@ -2443,11 +2443,7 @@
}
}
- /* we are chrooted, daemon(3) fails to open /dev/null */
if (nullfd != -1) {
- dup2(nullfd, STDIN_FILENO);
- dup2(nullfd, STDOUT_FILENO);
- dup2(nullfd, STDERR_FILENO);
close(nullfd);
nullfd = -1;
}

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 3:52 PM (19 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15542757
Default Alt Text
D13603.diff (607 B)

Event Timeline