Handle SIGHUP during initialisation phase
PATCH 1/1 Handle SIGHUP during initialisation phase
Without this commit, if remote host cannot be reached, we get stuck in loop trying to connect and we cannot reload a new configuration using SIGHUP.
In this case, the only way to reload the configuration is to kill and relaunch the daemon.
With this commit, following use case can be done:
- Set a good config file
- Launch vpn client daemon -> Connect OK
- Change config file (configure a wrong remote host)
- SIGHUP
- client daemon reload conf -> Connect failed and loop retrying connection
- Change config file (configure a good remote host)
- SIGHUP
- client daemon reload conf -> Connect OK
Signed-off-by Herve Codina <[email protected]...>
--- src/openvpn/sig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/openvpn/sig.c +1 -1
@@ -226,7 +226,7 @@ pre_init_signal_catch (void) signal_mode =SM_PRE_INIT ;signal (SIGINT , signal_handler);signal (SIGTERM , signal_handler); -signal (SIGHUP ,SIG_IGN ); +signal (SIGHUP , signal_handler);signal (SIGUSR1 ,SIG_IGN );signal (SIGUSR2 ,SIG_IGN );signal (SIGPIPE ,SIG_IGN );
Signature · 1 line
1.7.9.5