From mboxrd@z Thu Jan 1 00:00:00 1970 To: weigelt@metux.de, 9fans@9fans.net Subject: Re: [9fans] command line tool for storing / reading files on venti From: "Russ Cox" Date: Sat, 14 Jun 2008 13:51:45 -0400 In-Reply-To: <20080614130357.GA25092@nibiru.local> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20080614175003.4DA171E8C3A@holo.morphisms.net> Topicbox-Message-UUID: c0b02b82-ead3-11e9-9d60-3106f5b1d025 >> no, it doesn't. on plan 9, when the shell script exits, >> nothing will have vacfs mounted anymore, so vacfs >> will get an eof on the 9p connection and exit. >> that's why i put an rfork n in the script. > > aha, that's probably what the rfork call does ? rfork n forks the name space, so that any changes made by the script don't propagate out to the parent process. This means that (1) vacfs can mount on /n/vac without any fear of bothering some other instance of the script, and (2) when the script exits, there will be no more references to the mounted /n/vac and the kernel will unmount it. If you want simple, you should run Plan 9. > Meanwhile I've hacked up vacfs to give it an "autodie" mode. > It means: automatically terminate if the last file has been > closed. Seems to work, but now idea how stable it would be > in production ;-o In the time it took you to do that you could probably have written unvac instead. Russ