aboutsummaryrefslogtreecommitdiff
path: root/toys/pending
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-07-17 22:50:49 -0500
committerRob Landley <rob@landley.net>2014-07-17 22:50:49 -0500
commitc880061f511e85d55afe3966f5eda0df7c3ebb56 (patch)
treef6fedbd6dbe1f819bfa63210eb61b25ca6476ef6 /toys/pending
parentfc7bc38af05fc882472d310a0b68648ed990ef2d (diff)
downloadtoybox-c880061f511e85d55afe3966f5eda0df7c3ebb56.tar.gz
Use libc daemon() instead of pending daemonize.
Diffstat (limited to 'toys/pending')
-rw-r--r--toys/pending/dhcpd.c2
-rw-r--r--toys/pending/klogd.c2
-rw-r--r--toys/pending/syslogd.c2
-rw-r--r--toys/pending/telnetd.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/toys/pending/dhcpd.c b/toys/pending/dhcpd.c
index 2919cb52..7da51949 100644
--- a/toys/pending/dhcpd.c
+++ b/toys/pending/dhcpd.c
@@ -1086,7 +1086,7 @@ void dhcpd_main(void)
infomode = LOG_CONSOLE;
if (!(flag_chk(FLAG_f))) {
- daemonize();
+ daemon(0,0);
infomode = LOG_SILENT;
}
if (flag_chk(FLAG_S)) {
diff --git a/toys/pending/klogd.c b/toys/pending/klogd.c
index 54abedff..2c842889 100644
--- a/toys/pending/klogd.c
+++ b/toys/pending/klogd.c
@@ -68,7 +68,7 @@ void klogd_main(void)
sigatexit(handle_signal);
if (toys.optflags & FLAG_c) set_log_level(TT.level); //set log level
- if (!(toys.optflags & FLAG_n)) daemonize(); //Make it daemon
+ if (!(toys.optflags & FLAG_n)) daemon(0, 0); //Make it daemon
if (CFG_KLOGD_SOURCE_RING_BUFFER) {
syslog(LOG_NOTICE, "KLOGD: started with Kernel ring buffer as log source\n");
diff --git a/toys/pending/syslogd.c b/toys/pending/syslogd.c
index db2e52ee..7fb297f8 100644
--- a/toys/pending/syslogd.c
+++ b/toys/pending/syslogd.c
@@ -470,7 +470,7 @@ init_jumpin:
if (parse_config_file() == -1) goto clean_and_exit;
open_logfiles();
if (!(toys.optflags & FLAG_n)) {
- daemonize();
+ daemon(0, 0);
//don't daemonize again if SIGHUP received.
toys.optflags |= FLAG_n;
}
diff --git a/toys/pending/telnetd.c b/toys/pending/telnetd.c
index 3c0f8e39..4198e63f 100644
--- a/toys/pending/telnetd.c
+++ b/toys/pending/telnetd.c
@@ -317,7 +317,7 @@ void telnetd_main(void)
master_fd = listen_socket();
fcntl(master_fd, F_SETFD, FD_CLOEXEC);
if (master_fd > TT.gmax_fd) TT.gmax_fd = master_fd;
- if (!(toys.optflags & FLAG_F)) daemonize();
+ if (!(toys.optflags & FLAG_F)) daemon(0, 0);
} else {
pty_fd = new_session(master_fd); //master_fd = 0
if (pty_fd > TT.gmax_fd) TT.gmax_fd = pty_fd;