From: Joel Rosdahl Date: Sun, 9 Aug 2015 20:07:11 +0000 (+0200) Subject: Exit properly from exit handler X-Git-Tag: v3.2.3~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c692f07c890f3aecb6242224c3b8dc8bc0d5a17;p=thirdparty%2Fccache.git Exit properly from exit handler 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().) --- diff --git a/NEWS.txt b/NEWS.txt index 03e4c5f10..193c52b65 100644 --- 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. diff --git a/ccache.c b/ccache.c index ffda471a8..c69745f5d 100644 --- 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