diff options
| author | Roy Marples <roy@marples.name> | 2008-09-05 07:22:03 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2008-09-05 07:22:03 +0000 |
| commit | da16617840a22827d78c99bab837d9be0a420c7c (patch) | |
| tree | 2d9fcadedde0a0f3e1b4b3e654972a28875e1e9b /bind.c | |
| parent | 686608c28c738b3a990512d7ab6b22c7396b3117 (diff) | |
| download | dhcpcd-da16617840a22827d78c99bab837d9be0a420c7c.tar.xz | |
Remove some ints and replace with our option mask.
Diffstat (limited to 'bind.c')
| -rw-r--r-- | bind.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -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; } |
