diff options
Diffstat (limited to 'src/syscall/exec_linux.go')
| -rw-r--r-- | src/syscall/exec_linux.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/syscall/exec_linux.go b/src/syscall/exec_linux.go index b0099cb4b0..6353da4048 100644 --- a/src/syscall/exec_linux.go +++ b/src/syscall/exec_linux.go @@ -208,18 +208,12 @@ func forkAndExecInChild1(argv0 *byte, argv, envv []*byte, chroot, dir *byte, att } } - 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. runtime_BeforeFork() locked = true switch { - case hasRawVforkSyscall && (sys.Cloneflags&CLONE_NEWUSER == 0 && sys.Unshareflags&CLONE_NEWUSER == 0): + case sys.Cloneflags&CLONE_NEWUSER == 0 && sys.Unshareflags&CLONE_NEWUSER == 0: r1, err1 = rawVforkSyscall(SYS_CLONE, uintptr(SIGCHLD|CLONE_VFORK|CLONE_VM)|sys.Cloneflags) case runtime.GOARCH == "s390x": r1, _, err1 = RawSyscall6(SYS_CLONE, 0, uintptr(SIGCHLD)|sys.Cloneflags, 0, 0, 0, 0) |
