Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F105783977
D13603.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
607 B
Referenced Files
None
Subscribers
None
D13603.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D13603: Use daemon(3) in the dhclient(8).
Attached
Detach File
Event Timeline
Log In to Comment