diff options
author | Martin Willi <martin@strongswan.org> | 2006-04-26 07:50:06 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2006-04-26 07:50:06 +0000 |
commit | a2553ef8adc7f3c9c66432f213a49673fd6840c3 (patch) | |
tree | 2034b6895e86984ff9fa3374f511d3bdd03fe07c /Source | |
parent | 13e4a62f5c352981a93156be7749bfa712782d84 (diff) | |
download | strongswan-a2553ef8adc7f3c9c66432f213a49673fd6840c3.tar.bz2 strongswan-a2553ef8adc7f3c9c66432f213a49673fd6840c3.tar.xz |
- setup PID file after daemon initilization, to correctly inform
starter about daemon startup
Diffstat (limited to 'Source')
-rw-r--r-- | Source/charon/daemon.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/charon/daemon.c b/Source/charon/daemon.c index 680519228..4b0ea54e8 100644 --- a/Source/charon/daemon.c +++ b/Source/charon/daemon.c @@ -354,12 +354,14 @@ int main(int argc, char *argv[]) logger_manager->set_output(logger_manager, ALL_LOGGERS, NULL); } } - private_charon = daemon_create(); charon = (daemon_t*)private_charon; private_charon->logger = logger_manager->get_logger(logger_manager, DAEMON); + /* initialize daemon */ + private_charon->initialize(private_charon); + /* check/setup PID file */ if (stat(PID_FILE, &stb) == 0) { @@ -375,8 +377,7 @@ int main(int argc, char *argv[]) fclose(pid_file); } - /* initialize and run daemon */ - private_charon->initialize(private_charon); + /* run daemon */ private_charon->run(private_charon); /* normal termination, cleanup and exit */ |