mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-02 07:28:21 +00:00
fork syscall: fix first thread not being set in threads array
This commit is contained in:
@@ -48,6 +48,7 @@ syscallret_t syscall_fork(context_t *ctx) {
|
|||||||
nproc->umask = _cpu()->thread->proc->umask;
|
nproc->umask = _cpu()->thread->proc->umask;
|
||||||
nproc->root = sched_getroot();
|
nproc->root = sched_getroot();
|
||||||
nproc->cwd = sched_getcwd();
|
nproc->cwd = sched_getcwd();
|
||||||
|
nproc->threads[0] = nthread;
|
||||||
|
|
||||||
ARCH_CONTEXT_THREADSAVE(nthread, ctx);
|
ARCH_CONTEXT_THREADSAVE(nthread, ctx);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user