summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2011-12-19 20:59:53 +0100
committerJoel Rosdahl <joel@rosdahl.net>2011-12-19 20:59:53 +0100
commit3595be06de93cb8c4255171be8a647af4e5d460d (patch)
treebd2bd7c966c4e6db7d0cb2dd1f81cf0a955373a9
parent15275c83dcb66f89de70a80fd1e437975f8ec7be (diff)
downloadccache-3595be06de93cb8c4255171be8a647af4e5d460d.tar.gz
Make failure to create files in cache fatal
Previously, such failures were erroneously flagged as "compiler produced stdout".
-rw-r--r--ccache.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ccache.c b/ccache.c
index 9f6d003c..e3591688 100644
--- a/ccache.c
+++ b/ccache.c
@@ -529,7 +529,10 @@ to_cache(struct args *args)
status = execute(args->argv, tmp_stdout, tmp_stderr);
args_pop(args, 3);
- if (stat(tmp_stdout, &st) != 0 || st.st_size != 0) {
+ if (stat(tmp_stdout, &st) != 0) {
+ fatal("Could not create %s (permission denied?)", tmp_stdout);
+ }
+ if (st.st_size != 0) {
cc_log("Compiler produced stdout");
stats_update(STATS_STDOUT);
tmp_unlink(tmp_stdout);