diff options
author | Jeff King <peff@peff.net> | 2009-01-22 01:03:08 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-01-21 22:46:53 -0800 |
commit | 57b235a4bc8884a57c6f863605a54b7bfceb0997 (patch) | |
tree | 7128eed3ea8f2352f3b43e810d9edce740f920e8 /builtin-fetch--tool.c | |
parent | chain kill signals for cleanup functions (diff) | |
download | tgif-57b235a4bc8884a57c6f863605a54b7bfceb0997.tar.xz |
refactor signal handling for cleanup functions
The current code is very inconsistent about which signals
are caught for doing cleanup of temporary files and lock
files. Some callsites checked only SIGINT, while others
checked a variety of death-dealing signals.
This patch factors out those signals to a single function,
and then calls it everywhere. For some sites, that means
this is a simple clean up. For others, it is an improvement
in that they will now properly clean themselves up after a
larger variety of signals.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-fetch--tool.c')
-rw-r--r-- | builtin-fetch--tool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-fetch--tool.c b/builtin-fetch--tool.c index b1d7f8fb32..29356d25db 100644 --- a/builtin-fetch--tool.c +++ b/builtin-fetch--tool.c @@ -246,7 +246,7 @@ static int fetch_native_store(FILE *fp, char buffer[1024]; int err = 0; - sigchain_push(SIGINT, remove_keep_on_signal); + sigchain_push_common(remove_keep_on_signal); atexit(remove_keep); while (fgets(buffer, sizeof(buffer), stdin)) { |