1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-27 17:00:27 +00:00

Fix some return issues.

This commit is contained in:
Calvin Rose 2021-01-03 11:54:31 -06:00
parent 115556fcf2
commit 7b030fe70d

View File

@ -469,7 +469,12 @@ os_proc_wait_impl(JanetProc *proc) {
static Janet os_proc_wait(int32_t argc, Janet *argv) {
janet_fixarity(argc, 1);
JanetProc *proc = janet_getabstract(argv, 0, &ProcAT);
#ifdef JANET_EV
os_proc_wait_impl(proc);
return janet_wrap_nil();
#else
return os_proc_wait_impl(proc);
#endif
}
static Janet os_proc_kill(int32_t argc, Janet *argv) {
@ -493,7 +498,12 @@ static Janet os_proc_kill(int32_t argc, Janet *argv) {
#endif
/* After killing process we wait on it. */
if (argc > 1 && janet_truthy(argv[1])) {
#ifdef JANET_EV
os_proc_wait_impl(proc);
return janet_wrap_nil();
#else
return os_proc_wait_impl(proc);
#endif
} else {
return argv[0];
}