From d1f48db1cc021924e52614b5f7a71ab8bfa3f1cd Mon Sep 17 00:00:00 2001 From: Andrey Mirtchovski Date: Mon, 31 Oct 2011 13:34:59 -0400 Subject: [PATCH] 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 --- src/pkg/syscall/syscall_plan9.go | 4 ++++ 1 file changed, 4 insertions(+) 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 } -- 2.50.0