• Brad Fitzpatrick's avatar
    syscall: add Dup3 on Linux · c8d49cf5
    Brad Fitzpatrick authored
    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
    c8d49cf5
zsyscall_linux_amd64.go 43.6 KB