diff options
Diffstat (limited to 'src/kernel/syscalls.c')
-rw-r--r-- | src/kernel/syscalls.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c index eff670e..3d35a4a 100644 --- a/src/kernel/syscalls.c +++ b/src/kernel/syscalls.c @@ -5,6 +5,12 @@ #include <stdint.h> _Noreturn void sc_exit(const char *msg, size_t len) { + process_current->state = PS_DEAD; + + process_current = process_find(PS_RUNNING); + if (process_current) + process_switch(process_current); + log_const("last process returned. "); panic(); } |