From b48078c12cdf0e3b718e38102b7548c14bed33a4 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Thu, 18 Jun 2015 22:58:56 +0200 Subject: 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. --- sys/src/9/port/swap.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/src/9/port/swap.c b/sys/src/9/port/swap.c index 73d12345a..efbf3cbb4 100644 --- a/sys/src/9/port/swap.c +++ b/sys/src/9/port/swap.c @@ -149,6 +149,10 @@ pager(void*) Segment *s; Proc *p, *ep; + cclose(up->dot); + up->dot = up->slash; + incref(up->dot); + p = proctab(0); ep = &p[conf.nproc]; -- cgit v1.2.3