mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-28 04:46:44 -04:00
unix: fix darwin pipe implementation
The raw syscall returned the two pipes whereas the libc call takes a pointer to a location to write the two pipes. When we switched over from raw syscalls to libc calls, this change in behavior was missed. Fixes golang/go#43498 Change-Id: Icee2204dcb8be8fc94be0df106e1ff061cafa446 Reviewed-on: https://go-review.googlesource.com/c/sys/+/281432 Trust: Keith Randall <khr@golang.org> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
@@ -462,10 +462,8 @@ func libc_munlockall_trampoline()
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe() (r int, w int, err error) {
|
||||
r0, r1, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), 0, 0, 0)
|
||||
r = int(r0)
|
||||
w = int(r1)
|
||||
func pipe(p *[2]int32) (err error) {
|
||||
_, _, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), uintptr(unsafe.Pointer(p)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user