aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/syscall/exec_unix.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2021-01-27 17:55:50 -0800
committerIan Lance Taylor <iant@golang.org>2021-01-29 11:04:55 -0800
commit726b7aa004d6885388a76521222602b8552a41ee (patch)
tree5179037ef840a43dcea0f3be4e07dbcbcfcb2c4a /libgo/go/syscall/exec_unix.go
parent91a95ad2ae0e0f2fa953fafe55ff2ec32c8277d5 (diff)
downloadgcc-726b7aa004d6885388a76521222602b8552a41ee.zip
gcc-726b7aa004d6885388a76521222602b8552a41ee.tar.gz
gcc-726b7aa004d6885388a76521222602b8552a41ee.tar.bz2
libgo: update to Go1.16rc1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/287493
Diffstat (limited to 'libgo/go/syscall/exec_unix.go')
-rw-r--r--libgo/go/syscall/exec_unix.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/libgo/go/syscall/exec_unix.go b/libgo/go/syscall/exec_unix.go
index 2441f5e..d89bf38 100644
--- a/libgo/go/syscall/exec_unix.go
+++ b/libgo/go/syscall/exec_unix.go
@@ -328,6 +328,7 @@ func runtime_AfterExec()
// execveLibc is non-nil on OS using libc syscall, set to execve in exec_libc.go; this
// avoids a build dependency for other platforms.
var execveDarwin func(path *byte, argv **byte, envp **byte) error
+var execveOpenBSD func(path *byte, argv **byte, envp **byte) error
// Exec invokes the execve(2) system call.
func Exec(argv0 string, argv []string, envv []string) (err error) {
@@ -352,6 +353,9 @@ func Exec(argv0 string, argv []string, envv []string) (err error) {
} else if runtime.GOOS == "darwin" || runtime.GOOS == "ios" {
// Similarly on Darwin.
err1 = execveDarwin(argv0p, &argvp[0], &envvp[0])
+ } else if runtime.GOOS == "openbsd" && runtime.GOARCH == "amd64" {
+ // Similarly on OpenBSD.
+ err1 = execveOpenBSD(argv0p, &argvp[0], &envvp[0])
} else {
_, _, err1 = RawSyscall(SYS_EXECVE,
uintptr(unsafe.Pointer(argv0p)),