aboutsummaryrefslogtreecommitdiff
path: root/src/syscall/syscall_dragonfly.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/syscall/syscall_dragonfly.go')
-rw-r--r--src/syscall/syscall_dragonfly.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/syscall/syscall_dragonfly.go b/src/syscall/syscall_dragonfly.go
index 0988fe4608..b01a4ada67 100644
--- a/src/syscall/syscall_dragonfly.go
+++ b/src/syscall/syscall_dragonfly.go
@@ -100,6 +100,19 @@ func Pipe(p []int) (err error) {
return
}
+//sysnb pipe2(p *[2]_C_int, flags int) (r int, w int, err error)
+
+func Pipe2(p []int, flags int) (err error) {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ // pipe2 on dragonfly takes an fds array as an argument, but still
+ // returns the file descriptors.
+ p[0], p[1], err = pipe2(&pp, flags)
+ return err
+}
+
//sys extpread(fd int, p []byte, flags int, offset int64) (n int, err error)
func Pread(fd int, p []byte, offset int64) (n int, err error) {
return extpread(fd, p, 0, offset)