From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Wed, 27 Oct 2004 13:51:10 -0400 From: Russ Cox To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] rio snarf In-Reply-To: <75959811c030beb33eb82d0460fcd6ca@plan9.escet.urjc.es> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <75959811c030beb33eb82d0460fcd6ca@plan9.escet.urjc.es> Topicbox-Message-UUID: f77d2f9e-eacd-11e9-9e20-41e7f4b1d025 > Well. We just found that removing snarf from rio fsys makes things > work great wrt sharing the snarf buffer across machines. If that's all you want to do, just create a /dev/snarf before rio runs -- if it sees one already there, it won't provide one. > At first, we thought that if was enough to call open(OTRUNC) while > copying to the snarf buffer, then we noticed the deadlock with the > open("/dev/snarf") in rio, then we tried removing snarf from rio, and, > voila. This I still don't fully understand. The reason the snarf buffer doesn't change until close is probably lost to history, but one nice effect is that updating the snarf buffer is atomic -- you'll never see a partially written one. > Either I'm crazy because of the lots of coffee I have been drinking, or > there is something I'm missing regarding why rio has snarf builtin instead > of using a regular file for that. Rio used to provide a separate snarf buffer for each instance of rio. It's only recently that there has been this push toward having one snarf buffer for the whole system. Russ