summaryrefslogtreecommitdiffstats
path: root/bind.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-09-05 07:22:03 +0000
committerRoy Marples <roy@marples.name>2008-09-05 07:22:03 +0000
commitda16617840a22827d78c99bab837d9be0a420c7c (patch)
tree2d9fcadedde0a0f3e1b4b3e654972a28875e1e9b /bind.c
parent686608c28c738b3a990512d7ab6b22c7396b3117 (diff)
downloaddhcpcd-da16617840a22827d78c99bab837d9be0a420c7c.tar.xz
Remove some ints and replace with our option mask.
Diffstat (limited to 'bind.c')
-rw-r--r--bind.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/bind.c b/bind.c
index 6e7367fc..b0f7c9ba 100644
--- a/bind.c
+++ b/bind.c
@@ -42,9 +42,6 @@
#include "net.h"
#include "signals.h"
-static int daemonised = 0;
-int can_daemonise = 1;
-
#ifndef THERE_IS_NO_FORK
pid_t
daemonise(void)
@@ -55,7 +52,7 @@ daemonise(void)
char buf = '\0';
int sidpipe[2];
- if (daemonised || !can_daemonise)
+ if (options & DHCPCD_DAEMONISED || !(options & DHCPCD_DAEMONISE))
return 0;
sigfillset(&full);
sigprocmask(SIG_SETMASK, &full, &old);
@@ -93,7 +90,7 @@ daemonise(void)
pidfd = -1;
exit(EXIT_SUCCESS);
}
- daemonised = 1;
+ options |= DHCPCD_DAEMONISED;
sigprocmask(SIG_SETMASK, &old, NULL);
return pid;
}