diff options
author | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2005-10-17 13:20:21 +0000 |
---|---|---|
committer | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2005-10-17 13:20:21 +0000 |
commit | 90e105d2186fc96d9884857ac5fa4bc73e16705c (patch) | |
tree | 086806f81c70847361e13421950076ad0cd06855 /init.c | |
parent | Brought up-to-date with Alon's PKCS11 patch at (diff) | |
download | openvpn-90e105d2186fc96d9884857ac5fa4bc73e16705c.tar.xz |
Fixed double fork bug.
Pre-2.1_beta5
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@656 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'init.c')
-rw-r--r-- | init.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1860,7 +1860,7 @@ do_compute_occ_strings (struct context *c) static void do_init_first_time (struct context *c) { - if (c->first_time && !c->c2.did_we_daemonize) + if (c->first_time && !c->did_we_daemonize) { /* get user and/or group that we want to setuid/setgid to */ c->c2.uid_gid_specified = @@ -1871,10 +1871,10 @@ do_init_first_time (struct context *c) get_pid_file (c->options.writepid, &c->c2.pid_state); /* become a daemon if --daemon */ - c->c2.did_we_daemonize = possibly_become_daemon (&c->options, c->first_time); + c->did_we_daemonize = possibly_become_daemon (&c->options, c->first_time); /* should we disable paging? */ - if (c->options.mlock && c->c2.did_we_daemonize) + if (c->options.mlock && c->did_we_daemonize) do_mlockall (true); /* call again in case we daemonized */ /* save process ID in a file */ |