• Ian Lance Taylor's avatar
    syscall: change Dup,Dup2,Dup3 to use Syscall, not RawSyscall · 28074d5b
    Ian Lance Taylor authored
    This avoids hanging when a Go program uses a FUSE filesystem and the
    dup system call has to close a file descriptor.  When dup uses
    RawSyscall then the goroutine calling dup will occupy a scheduler slot
    (a p structure) during the call, and may block waiting for some other
    goroutine to respond to the close call on the FUSE filesystem.
    Changing to Syscall avoids the problem.  This makes Dup a tiny bit
    slower but is quite unlikely to make a difference for any real
    programs.
    
    Fixes #10202.
    
    Change-Id: If6490a8f9b3c9cfed6acbfb4bfd1eaeac62ced17
    Reviewed-on: https://go-review.googlesource.com/8095Reviewed-by: 's avatarRob Pike <r@golang.org>
    28074d5b
syscall_linux_ppc64x.go 4.57 KB