diff options
Diffstat (limited to 'kernel/features/syscall.c')
-rw-r--r-- | kernel/features/syscall.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel/features/syscall.c b/kernel/features/syscall.c index 2334947..7d68d93 100644 --- a/kernel/features/syscall.c +++ b/kernel/features/syscall.c @@ -73,11 +73,13 @@ static void syscall_handler(struct regs *r) char *path = (char *)r->ebx; struct proc *proc = proc_make(PROC_PRIV_NONE); r->eax = (u32)elf_load(path, proc); - if (r->eax != 0) + if (r->eax != 0) { proc_exit(proc, -r->eax); - // TODO: Reimplement argc,argv - proc_stack_push(proc, 0); - proc_yield(r); + } else { + // TODO: Reimplement argc,argv + proc_stack_push(proc, 0); + proc_yield(r); + } break; } case SYS_EXIT: { |