X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Ftincctl.c;h=a49654847f158d74c0cbafce1e9307a45c768122;hp=d02bda52e1b2ded0cbbaa5072a9b2f1a7f4f627a;hb=d1e01bc880a6970050e55f19bafe8eaf1f0b9be2;hpb=d219fe2c09652fcdc6b457bb5fd72ad18a3a33c5 diff --git a/src/tincctl.c b/src/tincctl.c index d02bda52..a4965484 100644 --- a/src/tincctl.c +++ b/src/tincctl.c @@ -830,8 +830,16 @@ static int cmd_start(int argc, char *argv[]) { free(nargv); - int status = -1; - if(waitpid(pid, &status, 0) != pid || !WIFEXITED(status) || WEXITSTATUS(status)) { + int status = -1, result; +#ifdef SIGINT + signal(SIGINT, SIG_IGN); +#endif + result = waitpid(pid, &status, 0); +#ifdef SIGINT + signal(SIGINT, SIG_DFL); +#endif + + if(result != pid || !WIFEXITED(status) || WEXITSTATUS(status)) { fprintf(stderr, "Error starting %s\n", c); return 1; }