[hackers] [scc] [driver] remove objfile only once per build failure || Quentin Rameau
commit bd58b52d4ce42081056c08e46411ac3df2118d2b
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Mon Jul 4 12:54:15 2016 +0200
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Mon Jul 4 12:54:15 2016 +0200
[driver] remove objfile only once per build failure
diff --git a/driver/posix/scc.c b/driver/posix/scc.c
index 3b6838d..e3b0199 100644
--- a/driver/posix/scc.c
+++ b/driver/posix/scc.c
_AT_@ -296,9 +296,6 @@ validatetools(void)
!WIFEXITED(st) || WEXITSTATUS(st) != 0) {
failure = 1;
failed = tool;
- unlink(objfile);
- free(objfile);
- objfile = NULL;
}
if (tool >= failed && t->outfile)
unlink(t->outfile);
_AT_@ -308,8 +305,14 @@ validatetools(void)
t->pid = 0;
}
}
+ if (failed < LAST_TOOL) {
+ unlink(objfile);
+ free(objfile);
+ objfile = NULL;
+ return 0;
+ }
- return failed == LAST_TOOL;
+ return 1;
}
static int
Received on Mon Jul 18 2016 - 18:06:44 CEST
This archive was generated by hypermail 2.3.0
: Mon Jul 18 2016 - 18:13:08 CEST