diff options
author | Andrey Mirtchovski <mirtchovski@gmail.com> | 2011-10-31 13:34:59 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2011-10-31 13:34:59 -0400 |
commit | d1f48db1cc021924e52614b5f7a71ab8bfa3f1cd (patch) | |
tree | 7da2c13110e06202495f47547f44d208019127b6 | |
parent | 50110c9f83ee0cfa2909ca78a67f14dcca2e83c1 (diff) | |
download | go-d1f48db1cc021924e52614b5f7a71ab8bfa3f1cd.tar.gz go-d1f48db1cc021924e52614b5f7a71ab8bfa3f1cd.zip |
syscall: fix Await msg on Plan 9
Plan 9's await() returns '' for nil exit status but programs, most notably gotest,
see this as an error return.
R=rsc
CC=golang-dev
https://golang.org/cl/5305079
-rw-r--r-- | src/pkg/syscall/syscall_plan9.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pkg/syscall/syscall_plan9.go b/src/pkg/syscall/syscall_plan9.go index eacdd93c9c..16f8e7337e 100644 --- a/src/pkg/syscall/syscall_plan9.go +++ b/src/pkg/syscall/syscall_plan9.go @@ -245,6 +245,10 @@ func Await(w *Waitmsg) (err Error) { w.Time[1] = uint32(atoi(f[2])) w.Time[2] = uint32(atoi(f[3])) w.Msg = cstring(f[4]) + if w.Msg == "''" { + // await() returns '' for no error + w.Msg = "" + } return } |