ref: 6ae7ecce5e2c4d15f1b6a777a9a67d94757004a7
parent: baae3d3446d74c05b04c6daa3fc02bad0a006263
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Thu Jun 18 18:58:56 EDT 2015
kernel: do not inherit current directory channel (dot) to pager kproc() inherits dot and slash, pager needs to drop these channels, otherwise it will keep the files open preventing say, ramfs to exit.
--- a/sys/src/9/port/swap.c
+++ b/sys/src/9/port/swap.c
@@ -149,6 +149,10 @@
Segment *s;
Proc *p, *ep;
+ cclose(up->dot);
+ up->dot = up->slash;
+ incref(up->dot);
+
p = proctab(0);
ep = &p[conf.nproc];
--
⑨