diff options
| author | Junio C Hamano <gitster@pobox.com> | 2009-01-31 17:43:56 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2009-01-31 17:43:56 -0800 |
| commit | fa5bc8abb35e34f673c41cb5c66d0a2f21536861 (patch) | |
| tree | e76e7f9d8d64db34f148f7ddfa6bca928c194d65 /builtin-fetch.c | |
| parent | 2edefe38a813deb4dfbd62dcf47520aeb1af15fc (diff) | |
| parent | 0ea8039644968e53d79a8dfbf739c87af4261d46 (diff) | |
| download | git-fa5bc8abb35e34f673c41cb5c66d0a2f21536861.tar.gz | |
Merge branch 'jk/signal-cleanup'
* jk/signal-cleanup:
t0005: use SIGTERM for sigchain test
pager: do wait_for_pager on signal death
refactor signal handling for cleanup functions
chain kill signals for cleanup functions
diff: refactor tempfile cleanup handling
Windows: Fix signal numbers
Diffstat (limited to 'builtin-fetch.c')
| -rw-r--r-- | builtin-fetch.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin-fetch.c b/builtin-fetch.c index de6f3074b1..1e4a3d9c51 100644 --- a/builtin-fetch.c +++ b/builtin-fetch.c @@ -10,6 +10,7 @@ #include "transport.h" #include "run-command.h" #include "parse-options.h" +#include "sigchain.h" static const char * const builtin_fetch_usage[] = { "git fetch [options] [<repository> <refspec>...]", @@ -58,7 +59,7 @@ static void unlock_pack(void) static void unlock_pack_on_signal(int signo) { unlock_pack(); - signal(SIGINT, SIG_DFL); + sigchain_pop(signo); raise(signo); } @@ -672,7 +673,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix) ref_nr = j; } - signal(SIGINT, unlock_pack_on_signal); + sigchain_push_common(unlock_pack_on_signal); atexit(unlock_pack); exit_code = do_fetch(transport, parse_fetch_refspec(ref_nr, refs), ref_nr); |
