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-clone.c | |
parent | Merge branch 'jg/mergetool' (diff) | |
parent | t0005: use SIGTERM for sigchain test (diff) | |
download | tgif-fa5bc8abb35e34f673c41cb5c66d0a2f21536861.tar.xz |
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-clone.c')
-rw-r--r-- | builtin-clone.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin-clone.c b/builtin-clone.c index 1e9c9aa844..f73029e2ba 100644 --- a/builtin-clone.c +++ b/builtin-clone.c @@ -19,6 +19,7 @@ #include "strbuf.h" #include "dir.h" #include "pack-refs.h" +#include "sigchain.h" /* * Overall FIXMEs: @@ -288,7 +289,7 @@ static void remove_junk(void) static void remove_junk_on_signal(int signo) { remove_junk(); - signal(SIGINT, SIG_DFL); + sigchain_pop(signo); raise(signo); } @@ -441,7 +442,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix) } junk_git_dir = git_dir; atexit(remove_junk); - signal(SIGINT, remove_junk_on_signal); + sigchain_push_common(remove_junk_on_signal); setenv(CONFIG_ENVIRONMENT, xstrdup(mkpath("%s/config", git_dir)), 1); |