Signed-off-by: Jiwei Sun <[email protected]>
---
 utils.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/utils.c b/utils.c
index 6d65388..a07faec 100644
--- a/utils.c
+++ b/utils.c
@@ -300,9 +300,19 @@ wait_child(const char *ptest_dir, const char *run_ptest, 
pid_t pid,
        }
 
        if (status) {
-               fprintf(fps[0], "\nERROR: Exit status is %d\n", status);
                if (timeouted)
-                       fprintf(fps[0], "TIMEOUT: %s\n", ptest_dir);
+                       fprintf(fps[0], "TIMEOUT: %s ", ptest_dir);
+
+               if(WIFEXITED(status)) {
+                       fprintf(fps[0], "\nERROR: Exit status is %d\n", 
WEXITSTATUS(status));
+                       return WEXITSTATUS(status);
+               }
+               else if(WIFSIGNALED(status)) {
+                       fprintf(fps[0], " Killed by signal\n");
+                       return 127;
+               }
+               else
+                       fprintf(fps[0], "\nERROR: Exit status is %d\n", status);
        }
 
        return status;
-- 
1.8.3.1

-- 
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to