From 590bac0f89cc01fa8ea10c68fef6590cfab584cc Mon Sep 17 00:00:00 2001 From: angt Date: Wed, 2 Dec 2015 17:05:51 +0100 Subject: [PATCH] Add trap option to use SIGUSR2 --- src/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 747cda1..73b554d 100644 --- a/src/main.c +++ b/src/main.c @@ -694,6 +694,7 @@ int main (int argc, char **argv) { "noquickack", NULL, option_option }, { "retry", &retry_opts, option_option }, { "daemon", &daemon_opts, option_option }, + { "trap", NULL, option_option }, { "version", NULL, option_option }, { NULL }, }; @@ -825,7 +826,9 @@ int main (int argc, char **argv) continue; } - kill(0, SIGUSR2); + if (option_is_set(opts, "trap")) + kill(0, SIGUSR2); + gt_log("%s: connected\n", sockname); fd_set_nonblock(sock.fd);