X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-fetch--tool.c;h=29356d25db910c6d90df46da87aa374467611350;hb=381b920b8ac1440962f340cba9030e2dc3130c49;hp=469b07e240953aa21fd67eb2563e094a7f0f3d42;hpb=f0817310903312bbc243dd80f066e17a8e0e4b1d;p=git.git diff --git a/builtin-fetch--tool.c b/builtin-fetch--tool.c index 469b07e24..29356d25d 100644 --- a/builtin-fetch--tool.c +++ b/builtin-fetch--tool.c @@ -2,6 +2,7 @@ #include "cache.h" #include "refs.h" #include "commit.h" +#include "sigchain.h" static char *get_stdin(void) { @@ -186,7 +187,7 @@ static void remove_keep(void) static void remove_keep_on_signal(int signo) { remove_keep(); - signal(SIGINT, SIG_DFL); + sigchain_pop(signo); raise(signo); } @@ -245,7 +246,7 @@ static int fetch_native_store(FILE *fp, char buffer[1024]; int err = 0; - signal(SIGINT, remove_keep_on_signal); + sigchain_push_common(remove_keep_on_signal); atexit(remove_keep); while (fgets(buffer, sizeof(buffer), stdin)) {