diff options
Diffstat (limited to 'kernel/syscalls.c')
| -rw-r--r-- | kernel/syscalls.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/kernel/syscalls.c b/kernel/syscalls.c index d289121..01bc7a5 100644 --- a/kernel/syscalls.c +++ b/kernel/syscalls.c @@ -302,7 +302,16 @@ uint32_t syscall_fork(int none1, int none2, int none3, int pid) uint32_t syscall_clone(int none1, int none2, int none3, int pid) { - return task_clone(pid); + uint32_t newpid=task_clone(pid); + + for(int i=0;i<MAX_FD;i++) // TODO: use same pid and use same list maybe? + { + if(!open_fd[pid][i])continue; + fds[newpid][i]=fd_dupl(&fds[pid][i]); + open_fd[newpid][i]=true; + } + + return newpid; } uint32_t syscall_wait(int none1, int none2, int none3, int pid) |
