On Mon, Oct 31, 2011 at 3:10 PM, Skip Tavakkolian
<skip.tavakkol...@gmail.com> wrote:
> awesome job!  compiled fine. i'm running godoc and now rewriting some
> cgi's in go. many thanks to everyone  involved.

OK, now, the current problem with syscall/exec_plan9.go is that it is
a little too eager to close FDs. It's doing the close by hand because
it's not possible on Plan 9 to take an fd and set to to close-on-exec
-- that's only done on  open on Plan 9 (on unix the code does an
fcntl). But if an FD is used twice for a child -- as it is with
combined stdout/stderr -- then the close closes the fd before it can
be dup'ed a second time. Bad.

I did the lazy thing and commented out the erroneous close for now.
The easy fix is to track the fds to be closed in a map and then close
them all later. That's next. Another possibility is to allow '#d/*ctl'
to be writeable and implement a
closeonexec
control message for fds. But maybe that's  just too much. It is
certainly easy to do, but is that kind of feature something we want to
add?

ron

Reply via email to