diff --git a/src/core/os.c b/src/core/os.c index 9bc9820f..dcd68a16 100644 --- a/src/core/os.c +++ b/src/core/os.c @@ -505,8 +505,11 @@ static int proc_get_status(JanetProc *proc) { status = WEXITSTATUS(status); } else if (WIFSTOPPED(status)) { status = WSTOPSIG(status) + 128; - } else { + } else if (WIFSIGNALED(status)){ status = WTERMSIG(status) + 128; + } else { + /* Could possibly return -1 but for now, just panic */ + janet_panicf("Undefined status code for process termination, %d.", status); } return status; }