Properly close files when destroying procs
authorBarret Rhoden <brho@cs.berkeley.edu>
Fri, 1 Nov 2013 20:54:54 +0000 (13:54 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 16 Jan 2014 19:25:46 +0000 (11:25 -0800)
commit4b7dc32a41590184fd7ac1f00ea8eaf65280dacf
tree489ec77b5612189116faed52ae8ec534b7abc545
parent2efd739282cecfb6690af8948315a3a0474c7116
Properly close files when destroying procs

I'm not 100% happy with this, but we're locking anyways, so we might as
well use it to prevent concurrent additions/modifications when we're
destroying the process.

This prevents us from sharing fgrps, which I'm okay with.

There are lots of races involved, check the comments for details.

I left in the notes about where to deal with plan9/inferno chans.
kern/include/vfs.h
kern/src/process.c
kern/src/vfs.c