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

@ -9,10 +9,7 @@ package syscall
import "unsafe"
const (
_SYS_dup = SYS_DUP2
_SYS_setgroups = SYS_SETGROUPS32
)
const _SYS_setgroups = SYS_SETGROUPS32
func setTimespec(sec, nsec int64) Timespec {
return Timespec{Sec: int32(sec), Nsec: int32(nsec)}