diff options
author | Marvin Borner | 2021-03-20 19:52:56 +0100 |
---|---|---|
committer | Marvin Borner | 2021-03-20 19:52:56 +0100 |
commit | b96c27bba0b242fc860fc9a2fcb63f121312fa7e (patch) | |
tree | 0febf9d97020f131055ee41fe6d8b8bd6593045a /kernel/features/syscall.c | |
parent | 635751fc2a75f66d1541469b3204efb1701bd91c (diff) |
LGTM!
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: { |