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
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