]> Cypherpunks repositories - gostls13.git/commit
syscall: add Dup3 on Linux
authorBrad Fitzpatrick <bradfitz@golang.org>
Thu, 1 Aug 2013 06:38:53 +0000 (23:38 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 1 Aug 2013 06:38:53 +0000 (23:38 -0700)
commitc8d49cf56f2633ba2859f9ad4567bf754128824c
tree97a6d8cd20f4b77c2a13db967a9638f42080369b
parent252c107f2fe3e1ba8a58e06ec0e63fa8c8f90bb5
syscall: add Dup3 on Linux

With dup3, we can avoid an extra system call on some machines
while holding syscall.ForkLock. Currently we have to
syscall.Dup + syscall.CloseOnExec.

On machines with Linux and a new enough kernel, this can just
be dup3.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/12170045
src/pkg/syscall/syscall_linux.go
src/pkg/syscall/zsyscall_linux_386.go
src/pkg/syscall/zsyscall_linux_amd64.go
src/pkg/syscall/zsyscall_linux_arm.go