summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
complain if no disk 1
lots of cleanup
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/proc.c b/proc.c
index 401188e..80141db 100644
--- a/proc.c
+++ b/proc.c
@@ -113,7 +113,7 @@ copyproc(struct proc* p)
// Copy trapframe registers from parent.
np->tf = (struct trapframe*)(np->kstack + KSTACKSIZE) - 1;
- *np->tf = *p->tf;
+ memmove(np->tf, p->tf, sizeof(*np->tf));
// Clear %eax so that fork system call returns 0 in child.
np->tf->eax = 0;