diff options
author | 2004-09-17 14:54:09 +0000 | |
---|---|---|
committer | 2004-09-17 14:54:09 +0000 | |
commit | dcd652498c09f0342e32e8222b1af55c8ca70666 (patch) | |
tree | 18fc6bfda5646715c251259dd8ddc5b8c3a1ac75 | |
parent | Missing #ifdefs. (diff) | |
download | wireguard-openbsd-dcd652498c09f0342e32e8222b1af55c8ca70666.tar.xz wireguard-openbsd-dcd652498c09f0342e32e8222b1af55c8ca70666.zip |
avoid signal race.
ok ho@ otto@
-rw-r--r-- | sbin/isakmpd/isakmpd.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sbin/isakmpd/isakmpd.c b/sbin/isakmpd/isakmpd.c index 4df958b3b6c..8675201b02c 100644 --- a/sbin/isakmpd/isakmpd.c +++ b/sbin/isakmpd/isakmpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isakmpd.c,v 1.67 2004/06/25 20:25:34 hshoexer Exp $ */ +/* $OpenBSD: isakmpd.c,v 1.68 2004/09/17 14:54:09 hshoexer Exp $ */ /* $EOM: isakmpd.c,v 1.54 2000/10/05 09:28:22 niklas Exp $ */ /* @@ -266,8 +266,6 @@ report(void) ui_report("r"); log_to(old); fclose(rfp); - - sigusr1ed = 0; } static void @@ -286,8 +284,6 @@ rehash_timers(void) timer_rehash_timers(); #endif - - sigusr2ed = 0; } static void @@ -461,17 +457,19 @@ main(int argc, char *argv[]) while (1) { /* If someone has sent SIGHUP to us, reconfigure. */ if (sighupped) { + sighupped = 0; log_print("SIGHUP received"); reinit(); - sighupped = 0; } /* and if someone sent SIGUSR1, do a state report. */ if (sigusr1ed) { + sigusr1ed = 0; log_print("SIGUSR1 received"); report(); } /* and if someone sent SIGUSR2, do a timer rehash. */ if (sigusr2ed) { + sigusr2ed = 0; log_print("SIGUSR2 received"); rehash_timers(); } |