aboutsummaryrefslogtreecommitdiff
path: root/src/syscall/syscall_solaris.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/syscall/syscall_solaris.go')
-rw-r--r--src/syscall/syscall_solaris.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/syscall/syscall_solaris.go b/src/syscall/syscall_solaris.go
index daa4b88a71..7640aac25b 100644
--- a/src/syscall/syscall_solaris.go
+++ b/src/syscall/syscall_solaris.go
@@ -55,7 +55,9 @@ func Pipe(p []int) (err error) {
if e1 != 0 {
err = Errno(e1)
}
- p[0], p[1] = int(r0), int(w0)
+ if err == nil {
+ p[0], p[1] = int(r0), int(w0)
+ }
return
}