Stunnel delaying boot
- by Onitlikesonic
My stunnel implementation works fine when the network is plugged in but it takes an awful amount of time, which delays the whole boot process, when there is no network connected to the machine.
As extra information:
I'm using "delay=yes"
I'm using an fqdn (e.g: stunnel.mydomain.com) for the connections
Using ubuntu but this also happened with centos5 previously
How can this be avoided or a timeout specified?
edit: doing an strace as suggested by symcbean shows the following (including the last part where it hangs):
[...]
--- SIGCHLD (Child exited) @ 0 (0) ---
rt_sigreturn(0x11) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 6039
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7ff9ce0c79d0) = 6046
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 6046
--- SIGCHLD (Child exited) @ 0 (0) ---
rt_sigreturn(0x11) = 6046
write(1, "[Started: /etc/stunnel/stunnel.c"..., 37) = 37
write(1, "stunnel.\n", 9) = 9
exit_group(0) = ?
[...]
stunnel hangs in this line: wait4(-1,
and when i plug in the network cable it continues to show [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 6046