summaryrefslogtreecommitdiff
path: root/src/syscall/zsyscall_solaris_amd64.go
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2022-03-08 11:13:37 +0100
committerTobias Klauser <tobias.klauser@gmail.com>2022-03-08 21:16:30 +0000
commitde8ddd97accb417450db014d1f45723515cb5d80 (patch)
tree21a46873ab90b9e17661726868bf58bb72a2e40e /src/syscall/zsyscall_solaris_amd64.go
parente030833880b4ed20a7c153e6e58190c5649284ac (diff)
downloadgo-git-de8ddd97accb417450db014d1f45723515cb5d80.tar.gz
syscall: add Pipe2 on solaris and use it for forkExecPipe
Other platforms already define Pipe2, so add it for solaris as well. Change-Id: If0d2dfc9a3613479fb4611a673a20a4aa0af0b2b Reviewed-on: https://go-review.googlesource.com/c/go/+/390714 Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Trust: Matt Layher <mdlayher@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/syscall/zsyscall_solaris_amd64.go')
-rw-r--r--src/syscall/zsyscall_solaris_amd64.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/syscall/zsyscall_solaris_amd64.go b/src/syscall/zsyscall_solaris_amd64.go
index 2d8cdfd280..dad0580027 100644
--- a/src/syscall/zsyscall_solaris_amd64.go
+++ b/src/syscall/zsyscall_solaris_amd64.go
@@ -7,6 +7,7 @@ package syscall
import "unsafe"
+//go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so"
//go:cgo_import_dynamic libc_Getcwd getcwd "libc.so"
//go:cgo_import_dynamic libc_getgroups getgroups "libc.so"
//go:cgo_import_dynamic libc_setgroups setgroups "libc.so"
@@ -91,6 +92,7 @@ import "unsafe"
//go:cgo_import_dynamic libc_getexecname getexecname "libc.so"
//go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
+//go:linkname libc_pipe2 libc_pipe2
//go:linkname libc_Getcwd libc_Getcwd
//go:linkname libc_getgroups libc_getgroups
//go:linkname libc_setgroups libc_setgroups
@@ -178,6 +180,7 @@ import "unsafe"
type libcFunc uintptr
var (
+ libc_pipe2,
libc_Getcwd,
libc_getgroups,
libc_setgroups,
@@ -265,6 +268,16 @@ var (
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func pipe2(p *[2]_C_int, flags int) (err error) {
+ _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_pipe2)), 2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0, 0, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Getcwd(buf []byte) (n int, err error) {
var _p0 *byte
if len(buf) > 0 {