mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-01 14:47:28 -04:00
unix: replace blocked dup2 calls with dup3 on Android
Android O and newer blocks access to the dup2 syscall. Route calls to Dup2 to Dup3. Change-Id: I76c0180db260ece4840b8ebf2736fb3f8c7ff9eb Reviewed-on: https://go-review.googlesource.com/c/sys/+/231277 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
d923437fa5
commit
10377860bb
@@ -210,9 +210,9 @@ func InotifyInit() (fd int, err error) {
|
||||
return InotifyInit1(0)
|
||||
}
|
||||
|
||||
func Dup2(oldfd int, newfd int) (err error) {
|
||||
return Dup3(oldfd, newfd, 0)
|
||||
}
|
||||
// dup2 exists because func Dup3 in syscall_linux.go references
|
||||
// it in an unreachable path. dup2 isn't available on arm64.
|
||||
func dup2(oldfd int, newfd int) error
|
||||
|
||||
func Pause() error {
|
||||
_, err := ppoll(nil, 0, nil, nil)
|
||||
|
||||
Reference in New Issue
Block a user