1
0
mirror of https://github.com/golang/go synced 2024-11-12 03:10:22 -07:00

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
This commit is contained in:
Andrey Mirtchovski 2011-10-31 13:34:59 -04:00 committed by Russ Cox
parent 50110c9f83
commit d1f48db1cc

View 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
}