ref: 685c15128166e0388a3658d430f36caa6cf2de34
parent: 1cfdd2e710dde04ae54b5332797a25ef1006452e
author: Roberto E. Vargas Caballero <[email protected]>
date: Mon Jan 23 08:02:03 EST 2017
[driver] Give a message error when some tool finish unexpectly When a tool finishes without calling exit() or _exit() it means that it worked wrong, usually a segmentation fault, and it is very probable that without a message error. This patch adds an "internal error" to show some error to the user.
--- a/driver/posix/scc.c
+++ b/driver/posix/scc.c
@@ -301,6 +301,10 @@
if (waitpid(t->pid, &st, 0) < 0 ||
!WIFEXITED(st) ||
WEXITSTATUS(st) != 0) {
+ if (!WIFEXITED(st)) {
+ fprintf(stderr,
+ "scc:%s: internal error\n", t->bin);
+ }
failure = 1;
failed = tool;
}