1
0
mirror of https://github.com/golang/go synced 2024-09-24 23:20:12 -06:00

syscall: terminate error string in exec package on Plan 9

Try to prevent messages like this:
        './pack' file does not exist����������������������������������������������������������������������������������������������������
TBR=adonovan

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/66270043
This commit is contained in:
Rob Pike 2014-02-19 17:17:36 -08:00
parent 0d11cd1b6e
commit 3e37720bce

View File

@ -486,7 +486,7 @@ func forkExec(argv0 string, argv []string, attr *ProcAttr) (pid int, err error)
if err != nil || n != 0 {
if n != 0 {
err = NewError(string(errbuf[:]))
err = NewError(string(errbuf[:n]))
}
// Child failed; wait for it to exit, to make sure