commit b46bf000cd4457444f0ac8489703a90b7c1b5453
Author:     Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Mon Jan 23 13:02:03 2017 +0100
Commit:     Roberto E. Vargas Caballero <[email protected]>
CommitDate: Mon Jan 23 13:02:03 2017 +0100

    [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.

diff --git a/driver/posix/scc.c b/driver/posix/scc.c
index 7cc1a3f..647affb 100644
--- a/driver/posix/scc.c
+++ b/driver/posix/scc.c
@@ -301,6 +301,10 @@ validatetools(void)
                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;
                }

Reply via email to