summaryrefslogtreecommitdiffstats
path: root/src/aeswepd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/aeswepd.c')
-rw-r--r--src/aeswepd.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/aeswepd.c b/src/aeswepd.c
index 3c651e1..3cff079 100644
--- a/src/aeswepd.c
+++ b/src/aeswepd.c
@@ -18,6 +18,10 @@
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#define _GNU_SOURCE
#ifdef HAVE_CONFIG_H
@@ -54,7 +58,7 @@ int rekey_time = 24*60*60, /* prior to 0.4: 15*60*/
int key_map[MAX_WEP_KEYS];
char *interface_name = NULL;
-int daemonize = 1, use_syslog = 1, wait_on_fork = 0, use_status_file = 1, wait_on_kill = 0;
+int daemonize = 1, use_syslog = 1, wait_on_fork = 0, use_status_file = 1, wait_on_kill = 0;
char log_ident[32], pid_ident[32];
FILE *status_file = NULL;
@@ -364,7 +368,7 @@ void parse_args(int argc, char *argv[]) {
{0, 0, 0, 0}
};
int option_index = 0;
- int _help = 0, _kill = 0, _check = 0, _version = 0, r, _list_keys = 0, _key_set = 0;
+ int _help = 0, _kill = 0, _check = 0, _version = 0, _list_keys = 0, _key_set = 0, r;
char ln[64];
char *b;
@@ -414,6 +418,9 @@ void parse_args(int argc, char *argv[]) {
case 'w':
wait_on_fork = !wait_on_fork;
break;
+ case 'W':
+ wait_on_kill = !wait_on_kill;
+ break;
case 'h':
_help = 1;
break;
@@ -503,7 +510,7 @@ void parse_args(int argc, char *argv[]) {
if (_kill) {
int rv;
-
+
if (wait_on_kill)
rv = daemon_pid_file_kill_wait(SIGINT, 5);
else