Raymond Toy pushed to branch master at cmucl / cmucl
Commits: 81e08ecb by Raymond Toy at 2017-09-16T14:49:33-07:00 Clean up prog_status
- If `waidpid` returns 0 or -1, we should return. - Make the fprintf message a bit clearer on what's happening when we have some kind of status that we didn't handle.
- - - - -
1 changed file:
- src/lisp/runprog.c
Changes:
===================================== src/lisp/runprog.c ===================================== --- a/src/lisp/runprog.c +++ b/src/lisp/runprog.c @@ -107,8 +107,7 @@ prog_status(pid_t* pid, int* what, int* code, int* corep) w = waitpid(-1, &status, WNOHANG | WUNTRACED | WCONTINUED); *pid = w;
- if (w == -1) { - + if (w <= 0) { return; }
@@ -129,7 +128,7 @@ prog_status(pid_t* pid, int* what, int* code, int* corep) *code = 0; *corep = 0; } else { - fprintf(stderr, "pid = %d, status = 0x%x\n", *pid, status); + fprintf(stderr, "Unhandled waidpid status: pid = %d, status = 0x%x\n", *pid, status); }
return;
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/81e08ecbdbbafb9ee29a4013bb...
--- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/81e08ecbdbbafb9ee29a4013bb... You're receiving this email because of your account on gitlab.common-lisp.net.