From 7366fc30990f4d9124c933c73f7a71ad19d06bc8 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Mon, 27 Apr 2015 21:03:07 +0200 Subject: [PATCH] Remove signal-unsafe code from signal handler --- NEWS.txt | 2 ++ ccache.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS.txt b/NEWS.txt index 8bf0f2e37..04a3ea502 100644 --- 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 ------------ diff --git a/ccache.c b/ccache.c index 184c300a5..c1f4a1151 100644 --- 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. */ -- 2.47.2