summaryrefslogtreecommitdiff
path: root/src/syscall/exec_unix.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/syscall/exec_unix.go')
-rw-r--r--src/syscall/exec_unix.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/syscall/exec_unix.go b/src/syscall/exec_unix.go
index 9a950ac17f..3b84256b8e 100644
--- a/src/syscall/exec_unix.go
+++ b/src/syscall/exec_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
// Fork, exec, wait, etc.
@@ -246,9 +246,9 @@ func StartProcess(argv0 string, argv []string, attr *ProcAttr) (pid int, handle
func runtime_BeforeExec()
func runtime_AfterExec()
-// execveSolaris is non-nil on Solaris, set to execve in exec_solaris.go; this
+// 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 execveSolaris func(path uintptr, argv uintptr, envp uintptr) (err Errno)
+var execveLibc func(path uintptr, argv uintptr, envp uintptr) (err Errno)
// Exec invokes the execve(2) system call.
func Exec(argv0 string, argv []string, envv []string) (err error) {
@@ -267,9 +267,9 @@ func Exec(argv0 string, argv []string, envv []string) (err error) {
runtime_BeforeExec()
var err1 Errno
- if runtime.GOOS == "solaris" {
- // RawSyscall should never be used on Solaris.
- err1 = execveSolaris(
+ if runtime.GOOS == "solaris" || runtime.GOOS == "aix" {
+ // RawSyscall should never be used on Solaris or AIX.
+ err1 = execveLibc(
uintptr(unsafe.Pointer(argv0p)),
uintptr(unsafe.Pointer(&argvp[0])),
uintptr(unsafe.Pointer(&envvp[0])))