aboutsummaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2009-01-22 01:03:08 -0500
committerJunio C Hamano <gitster@pobox.com>2009-01-21 22:46:53 -0800
commit57b235a4bc8884a57c6f863605a54b7bfceb0997 (patch)
tree7128eed3ea8f2352f3b43e810d9edce740f920e8 /diff.c
parent4a16d072723b48699ea162da24eff05eba298834 (diff)
downloadgit-57b235a4bc8884a57c6f863605a54b7bfceb0997.tar.gz
git-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 'diff.c')
-rw-r--r--diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/diff.c b/diff.c
index 9c9977d89..8ce898a6b 100644
--- a/diff.c
+++ b/diff.c
@@ -1903,7 +1903,7 @@ static struct diff_tempfile *prepare_temp_file(const char *name,
if (!remove_tempfile_installed) {
atexit(remove_tempfile);
- sigchain_push(SIGINT, remove_tempfile_on_signal);
+ sigchain_push_common(remove_tempfile_on_signal);
remove_tempfile_installed = 1;
}