Sync fork/exec() with updates to procinfo/procdata
authorKevin Klues <klueska@cs.berkeley.edu>
Tue, 13 Oct 2015 04:40:26 +0000 (21:40 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 14 Oct 2015 20:50:10 +0000 (16:50 -0400)
commit335b33fa506e1ec66dd47391fed888ef7c3f7b44
treea248de88a4876980ac38552aa41bff8f7b4802e7
parent4ff6ddc627791e76293c8143ee6bb512e8929498
Sync fork/exec() with updates to procinfo/procdata

The pipetest added in the previous commit exposes a bug with not copying
enough data from procinfo/procdata into a forked process in cases where
we don't exec after the fork. This commit updates the fork and exec code
to make sure that the relevant fields in procinfo/procdata are copied
over properly on a fork. If we do end up execing, these fields are
reinitialized to their initial values.

Signed-off-by: Kevin Klues <klueska@cs.berkeley.edu>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/include/process.h
kern/src/process.c
kern/src/syscall.c