From: Joel Rosdahl Date: Mon, 21 Oct 2019 18:06:22 +0000 (+0200) Subject: Don’t fail fatally if temporary cpp_stderr file is missing X-Git-Tag: v3.7.5~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c74dbfe5d43fc23733bd44839b9bd119da94ba26;p=thirdparty%2Fccache.git Don’t fail fatally if temporary cpp_stderr file is missing If the temporary cpp_stderr file is missing when the compilation command has finished then either some user removed it or ccache removed it in clean_up_internal_tempdir (since the compilation took more than hour or the system clock was adjusted?). In either case, let’s just fall back to running the real compiler instead of failing fatally. Fixes #480 and #154. --- diff --git a/src/ccache.c b/src/ccache.c index 533a5de77..edfc8ca52 100644 --- a/src/ccache.c +++ b/src/ccache.c @@ -1720,7 +1720,10 @@ get_object_name_from_cpp(struct args *args, struct hash *hash) hash_delimiter(hash, "cppstderr"); if (!direct_i_file && !hash_file(hash, path_stderr)) { - fatal("Failed to open %s: %s", path_stderr, strerror(errno)); + // Somebody removed the temporary file? + stats_update(STATS_ERROR); + cc_log("Failed to open %s: %s", path_stderr, strerror(errno)); + failed(); } if (direct_i_file) {