net: use F_DUPFD_CLOEXEC when duping fds
This means that in the common case (modern kernel), we only
make 1 system call to dup instead of two, and we also avoid
grabbing the syscall.ForkLock.
https://codereview.appspot.com/12476043/diff/3001/src/pkg/net/fd_linux.go File src/pkg/net/fd_linux.go (right): https://codereview.appspot.com/12476043/diff/3001/src/pkg/net/fd_linux.go#newcode1 src/pkg/net/fd_linux.go:1: // Copyright 2013 The Go Authors. All rights reserved. ...
11 years, 7 months ago
(2013-08-05 20:40:55 UTC)
#2
Issue 12476043: code review 12476043: net: use F_DUPFD_CLOEXEC when duping fds
(Closed)
Created 11 years, 7 months ago by bradfitz
Modified 11 years, 7 months ago
Reviewers: dave_cheney.net
Base URL:
Comments: 2