Commit d52425ff authored by Nils Goroll's avatar Nils Goroll

varnishadm: do not ignore SIGTERM/SIGINT for interactive&pass mode

fixes #3229
parent cff50548
...@@ -467,9 +467,6 @@ main(int argc, char * const *argv) ...@@ -467,9 +467,6 @@ main(int argc, char * const *argv)
argc -= optind; argc -= optind;
argv += optind; argv += optind;
VSIG_Arm_int();
VSIG_Arm_term();
if (T_arg != NULL) { if (T_arg != NULL) {
if (n_arg != NULL) if (n_arg != NULL)
usage(1); usage(1);
...@@ -482,9 +479,14 @@ main(int argc, char * const *argv) ...@@ -482,9 +479,14 @@ main(int argc, char * const *argv)
if (sock < 0) if (sock < 0)
exit(2); exit(2);
if (argc > 0) if (argc > 0) {
VSIG_Arm_int();
VSIG_Arm_term();
do_args(sock, argc, argv); do_args(sock, argc, argv);
else if (isatty(0)) NEEDLESS(exit(0));
}
if (isatty(0))
interactive(sock); interactive(sock);
else else
pass(sock); pass(sock);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment