veyron/lib/unixfd: always set close on exec on the created sockpair

This CL is based on an interpretation of the comment at the top of
https://golang.org/src/syscall/exec_unix.go that suggests that we should always
set close on exec on all files, and exec will then unset that on the ones that
are passed via ExtraFiles. That sounds like the effect we want, but wondering if
there's a "gotcha" that I'm missing. All unit and integration tests pass (on my
linux workstation), but not sure about Mac. If this seems ok, I'll look into
also making all fd's we get through syscall.Dup have close on exec set on them.

Change-Id: Ifcf4b1d0af4a42ef68cfca5ef3f3fa6e3ed0771a
diff --git a/lib/modules/shell.go b/lib/modules/shell.go
index 6ed18d4..c80aae7 100644
--- a/lib/modules/shell.go
+++ b/lib/modules/shell.go
@@ -150,11 +150,14 @@
 		return nil, err
 	}
 	defer cancel()
+	syscall.ForkLock.RLock()
 	fd, err := syscall.Dup(int(conn.Fd()))
 	if err != nil {
+		syscall.ForkLock.RUnlock()
 		return nil, err
 	}
 	syscall.CloseOnExec(fd)
+	syscall.ForkLock.RUnlock()
 	p, err := agent.NewAgentPrincipal(ctx, fd, veyron2.GetClient(ctx))
 	if err != nil {
 		return nil, err