Can you add a commit message detailing what changed and why? Most of the
commit messages in this series don't help me understand what changed and
why: https://chris.beams.io/posts/git-commit/
This is especially important as the original author of the code has
moved on from the project.
On 29/09/17 03:09, Jiwei Sun wrote:
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;
Why 127? That's "command not found" in bash and EKEYEXPIRED in my errno.h
Could we just include errno and use a named error code?
+ }
+ else
+ fprintf(fps[0], "\nERROR: Exit status is %d\n", status);
}
return status;
Thanks,
Joshua
--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto