On Mon Oct 31 18:39:19 EDT 2011, [email protected] 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
