From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <09bc4af6170d58bf7301230f8f37b748@vitanuova.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] ctrl-d and rio Date: Thu, 4 Nov 2004 18:52:40 +0000 From: rog@vitanuova.com In-Reply-To: <334ef3045cd1529b82e0bf9767ba99f5@plan9.ucalgary.ca> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: fd2c523a-eacd-11e9-9e20-41e7f4b1d025 > never been bothered by it enough to look at the cause and assumed it's > just open file descriptors. still, i am interested in hearing > explanations/solutions. this has nagged at me too in the past, so i just had a look into it. there are two reasons (in in the plumber case, at any rate) why the shell window doesn't disappear correctly. the first is a bug in /sys/src/cmd/plumb/fsys.c:/^startfsys procrfork(fsysproc, nil, Stack, RFFDG); should be: procrfork(fsysproc, nil, Stack, RFFDG|RFNAMEG); otherwise the process serving the plumbing namespace is also holding that namespace open. but even with that fixed, the plumber automatically creates an entry in /srv. this holds the 9p pipe to the plumber open even when the shell holding the plumber's namespace exits. removing the /srv file allows the window to disappear correctly (a rio window only exits when the window's namespace is no longer referenced). so, assuming the first fix, plumber rm `{cat /env/plumbsrv} would be sufficient (although an option suppressing the /srv posting would likely be preferable).