Commit 83c58ac7 authored by Ian Lance Taylor's avatar Ian Lance Taylor

internal/poll: return error if WriteConsole fails

Fixes #19068.

Change-Id: Id76037826376b5fe8b588fe3dc02182dfaff8c21
Reviewed-on: https://go-review.googlesource.com/36935
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 62237c2c
......@@ -624,7 +624,7 @@ func (fd *FD) writeConsole(b []byte) (n int, err error) {
var written uint32
err = syscall.WriteConsole(fd.Sysfd, &uint16s[0], uint32(len(uint16s)), &written, nil)
if err != nil {
return 0, nil
return 0, err
}
uint16s = uint16s[written:]
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment