]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Exit properly from exit handler
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 9 Aug 2015 20:07:11 +0000 (22:07 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 9 Aug 2015 20:19:00 +0000 (22:19 +0200)
This fixes a problem where two SIGINT (Ctrl+C) signals were needed to
terminate an ongoing compilation. (The first SIGINT terminated the
compiler which exited with non-zero status, which ccache then went on
interpreting as an ordinary failed compilation, leading to rerunning the
compiler via failed().)

NEWS.txt
ccache.c

index 03e4c5f1012ec143130f38f03ec6352b4cd80b9b..193c52b6527b6ba4c264734788e29297a642e5ea 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -18,6 +18,8 @@ Bug fixes
 
 - Avoid calling `exit()` inside an exit handler.
 
+- Let exit handler terminate properly.
+
 - Only log "Disabling direct mode" once when failing to read potential include
   files.
 
index ffda471a83a69dc815e0e6e9863ab05adac982ac..c69745f5dec54e0dfc4d030f9c2c4296dc8264ef 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -341,6 +341,7 @@ signal_handler(int signo)
 {
        (void)signo;
        clean_up_pending_tmp_files();
+       _exit(1);
 }
 
 static void