diff options
Diffstat (limited to 'libntp/syssignal.c')
-rw-r--r-- | libntp/syssignal.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libntp/syssignal.c b/libntp/syssignal.c index 5e496a95f26db..cc87bffc5d587 100644 --- a/libntp/syssignal.c +++ b/libntp/syssignal.c @@ -138,12 +138,13 @@ set_ctrl_c_hook( if (NULL == c_hook) { handler = SIG_DFL; - ctrl_c_hook = NULL; + signal_no_reset(SIGINT, handler); + ctrl_c_hook = c_hook; } else { - handler = &sigint_handler; ctrl_c_hook = c_hook; + handler = &sigint_handler; + signal_no_reset(SIGINT, handler); } - signal_no_reset(SIGINT, handler); } #else /* SYS_WINNT follows */ /* |