proc: Move decref out of __proc_disown_child()
authorBarret Rhoden <brho@cs.berkeley.edu>
Tue, 13 Mar 2018 23:16:26 +0000 (19:16 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 28 Mar 2018 20:43:05 +0000 (16:43 -0400)
commitc7f5380a2941e605d2226202ed2f8b368a681fa9
tree1b227efcc90e6624a061f3073b97a3446dc03664
parent5aa7eb0c269b23a8620729755d4d9b515350fe10
proc: Move decref out of __proc_disown_child()

proc_decref() can potentially block.  If it's the last ref, it'll
trigger __proc_free(), which will close chans.  You can make this happen
if you cd into a #tmpfs directory, then unmount the tmpfs, and exit the
shell.

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