mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-27 20:36:31 -04:00
5829c748864970bb66aa29a1f92df3174f7c77a0
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. Update golang/go#10202. Change-Id: I590c5c9a04e0a1281a85dc553c7592fa83949ac7 Reviewed-on: https://go-review.googlesource.com/8056 Reviewed-by: Rob Pike <r@golang.org>
This repository holds supplemental Go packages for low-level interactions with the operating system. To submit changes to this repository, see http://golang.org/doc/contribute.html.
Description
[mirror] Go packages for low-level interaction with the operating system
15 MiB
Languages
Go
85.7%
Assembly
12.4%
Shell
1.7%
C
0.1%