From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <20111031223404.9FE57B856@mail.bitblocks.com> References: <20111031223404.9FE57B856@mail.bitblocks.com> Date: Mon, 31 Oct 2011 15:38:39 -0700 Message-ID: From: ron minnich To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [9fans] native (mostly) go for plan9 Topicbox-Message-UUID: 3d4ba0f6-ead7-11e9-9d60-3106f5b1d025 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 ... ron