syscall: support rawVforkSyscall on linux/riscv64

Updates #31936

Change-Id: I7dcb8987d4c306ccc97704b9c1b12313ba8bf242
Reviewed-on: https://go-review.googlesource.com/c/go/+/234960
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Joel Sing 2020-05-25 03:23:30 +10:00
parent cf9b4f63a5
commit d303630622
3 changed files with 28 additions and 4 deletions

View file

@ -207,7 +207,11 @@ func forkAndExecInChild1(argv0 *byte, argv, envv []*byte, chroot, dir *byte, att
}
}
hasRawVforkSyscall := runtime.GOARCH == "amd64" || runtime.GOARCH == "ppc64" || runtime.GOARCH == "s390x" || runtime.GOARCH == "arm64"
var hasRawVforkSyscall bool
switch runtime.GOARCH {
case "amd64", "arm64", "ppc64", "riscv64", "s390x":
hasRawVforkSyscall = true
}
// About to call fork.
// No more allocation or calls of non-assembly functions.