mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
This commit adds AIX operating system to syscall package for ppc64 architecture. It also adds the file syscall_aix.go in the runtime package for syscalls needed during fork and exec. Updates: #25893 Change-Id: I301b1051b178a3efb7bbc39cdbd8e00b594d65ef Reviewed-on: https://go-review.googlesource.com/c/138720 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
21 lines
501 B
Go
21 lines
501 B
Go
// Copyright 2011 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// +build aix darwin dragonfly solaris
|
|
|
|
package syscall
|
|
|
|
// Try to open a pipe with O_CLOEXEC set on both file descriptors.
|
|
func forkExecPipe(p []int) error {
|
|
err := Pipe(p)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
_, err = fcntl(p[0], F_SETFD, FD_CLOEXEC)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
_, err = fcntl(p[1], F_SETFD, FD_CLOEXEC)
|
|
return err
|
|
}
|