Skip to content

Commit 590bac0

Browse files
committed
Add trap option to use SIGUSR2
1 parent a43f2c9 commit 590bac0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,7 @@ int main (int argc, char **argv)
694694
{ "noquickack", NULL, option_option },
695695
{ "retry", &retry_opts, option_option },
696696
{ "daemon", &daemon_opts, option_option },
697+
{ "trap", NULL, option_option },
697698
{ "version", NULL, option_option },
698699
{ NULL },
699700
};
@@ -825,7 +826,9 @@ int main (int argc, char **argv)
825826
continue;
826827
}
827828

828-
kill(0, SIGUSR2);
829+
if (option_is_set(opts, "trap"))
830+
kill(0, SIGUSR2);
831+
829832
gt_log("%s: connected\n", sockname);
830833

831834
fd_set_nonblock(sock.fd);

0 commit comments

Comments
 (0)