syscall: avoid dup2 in forkAndExecInChild1 on Android

Android O and newer blocks the dup2 syscall.

Change-Id: Ibca01fc72ef114deeef6c0450a8b81a556ed0530
Reviewed-on: https://go-review.googlesource.com/c/go/+/235537
Run-TryBot: Elias Naur <mail@eliasnaur.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Elias Naur 2020-05-28 13:58:45 +02:00
parent 6bf2eea62a
commit 2711127974
11 changed files with 28 additions and 36 deletions

View file

@ -6,10 +6,7 @@ package syscall
import "unsafe"
const (
_SYS_dup = SYS_DUP3
_SYS_setgroups = SYS_SETGROUPS
)
const _SYS_setgroups = SYS_SETGROUPS
func EpollCreate(size int) (fd int, err error) {
if size <= 0 {