From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Mon, 31 Oct 2011 18:46:35 -0400 To: 9fans@9fans.net Message-ID: <1ba1d3d3e8c6c238b42ee6402e7df5ba@chula.quanstro.net> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] native (mostly) go for plan9 Topicbox-Message-UUID: 3d6639b6-ead7-11e9-9d60-3106f5b1d025 On Mon Oct 31 18:39:19 EDT 2011, rminnich@gmail.com wrote: > well, I could be really lazy. I think this would work. > > given an fd, say 6 > newfd = open('#d/6", OREXEC|permissions) > close(fd) > then dup the newfd. The newfd will close when you leave. > > Problem: what are the permissions for the old fd ... poke through /proc/$pid/fd and find out? otoh, it seems that the go runtime, if it wants this information, might have enough control to maintain it itself. - erik