mirror of
https://github.com/golang/go
synced 2024-11-18 17:54:57 -07:00
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: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
62237c2c8e
commit
83c58ac710
@ -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:]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user