]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Remove signal-unsafe code from signal handler
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 27 Apr 2015 19:03:07 +0000 (21:03 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 27 Apr 2015 19:41:19 +0000 (21:41 +0200)
NEWS.txt
ccache.c

index 8bf0f2e376e9b9a9739159f4aad2a8d3ef98064e..04a3ea50241a7b143f1ab13c931e68aca814856a 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -37,6 +37,8 @@ Bug fixes
 
 - Fixed build error when compiling ccache with recent clang versions.
 
+- Removed signal-unsafe code from signal handler.
+
 
 ccache 3.2.1
 ------------
index 184c300a5787bb26c6e0c573219a5c7dada46597..c1f4a115135ed03b18a8d95c5b7ebee75d004e20 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -306,7 +306,8 @@ clean_up_pending_tmp_files(void)
 {
        struct pending_tmp_file *p = pending_tmp_files;
        while (p) {
-               tmp_unlink(p->path);
+               /* Can't call tmp_unlink here since its cc_log calls aren't signal safe. */
+               unlink(p->path);
                p = p->next;
                /* Leak p->path and p here because clean_up_pending_tmp_files needs to be
                 * signal safe. */