syscall: fixes for Solaris
[official-gcc.git] / libgo / go / syscall / forkpipe_bsd.go
blob28897bfd79052036a1a65cbaac5f7e7442addd0e
1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 // +build darwin dragonfly netbsd openbsd solaris
7 package syscall
9 func forkExecPipe(p []int) error {
10 err := Pipe(p)
11 if err != nil {
12 return err
14 _, err = fcntl(p[0], F_SETFD, FD_CLOEXEC)
15 if err != nil {
16 return err
18 _, err = fcntl(p[1], F_SETFD, FD_CLOEXEC)
19 return err