]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: fix Await msg on Plan 9
authorAndrey Mirtchovski <mirtchovski@gmail.com>
Mon, 31 Oct 2011 17:34:59 +0000 (13:34 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 31 Oct 2011 17:34:59 +0000 (13:34 -0400)
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

index eacdd93c9c13fe59dd145add00f676a3e50f3d23..16f8e7337e6655274b8237ef67cbb42df522de02 100644 (file)
@@ -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
 }