diff --git a/src/lisp/runprog.c b/src/lisp/runprog.c
index 852584a83eb881134419bcc746902a87ea45ca04..556c34e0b35fd38a2433eb003cd75296c6c84825 100644
--- 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;