diff options
author | Francis Dupont <fdupont@isc.org> | 2016-10-01 01:35:37 +0200 |
---|---|---|
committer | Francis Dupont <fdupont@isc.org> | 2016-10-01 01:35:37 +0200 |
commit | 29b23207c05a7a0ec1a90d42dc4e49d47f9b1a7f (patch) | |
tree | 502b9cbff8cdce72054798e5a6699624640c499e /client/dhc6.c | |
parent | a1372bbec77052d550678db54ee2c10721480177 (diff) | |
download | isc-dhcp-29b23207c05a7a0ec1a90d42dc4e49d47f9b1a7f.tar.gz |
Daemonize sooner (code from bind9/named) (rebased)
Diffstat (limited to 'client/dhc6.c')
-rw-r--r-- | client/dhc6.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/client/dhc6.c b/client/dhc6.c index c8d16e8a..be604ac9 100644 --- a/client/dhc6.c +++ b/client/dhc6.c @@ -1500,7 +1500,7 @@ start_init6(struct client_state *client) add_timeout(&tv, do_init6, client, NULL, NULL); if (nowait) - go_daemon(); + detach(); } /* @@ -1544,7 +1544,7 @@ start_info_request6(struct client_state *client) add_timeout(&tv, do_info_request6, client, NULL, NULL); if (nowait) - go_daemon(); + detach(); } /* @@ -1871,7 +1871,7 @@ do_init6(void *input) } /* Stop if and only if this is the last client. */ if (stopping_finished()) - exit(2); + finish(2); return; } @@ -2176,7 +2176,7 @@ do_info_request6(void *input) case CHK_TIM_ALLOC_FAILURE: return; case CHK_TIM_MRD_EXCEEDED: - exit(2); + finish(2); case CHK_TIM_SUCCESS: break; } @@ -2418,7 +2418,7 @@ do_release6(void *input) dhc6_lease_destroy(&client->active_lease, MDL); client->active_lease = NULL; if (stopping_finished()) - exit(0); + finish(0); } /* status_log() just puts a status code into displayable form and logs it @@ -4224,7 +4224,7 @@ reply_handler(struct packet *packet, struct client_state *client) client->active_lease = NULL; /* We should never wait for nothing!? */ if (stopping_finished()) - exit(0); + finish(0); return; } @@ -4840,7 +4840,7 @@ start_bound(struct client_state *client) dhcp4o6_start(); #endif - go_daemon(); + detach(); if (client->old_lease != NULL) { dhc6_lease_destroy(&client->old_lease, MDL); @@ -5323,7 +5323,7 @@ dhc6_check_irt(struct client_state *client) #ifdef DHCP4o6 if (!dhcpv4_over_dhcpv6) #endif - exit(0); + finish(0); } oc = lookup_option(&dhcpv6_universe, client->active_lease->options, @@ -5382,7 +5382,7 @@ start_informed(struct client_state *client) dhcp4o6_start(); #endif - go_daemon(); + detach(); if (client->old_lease != NULL) { dhc6_lease_destroy(&client->old_lease, MDL); |