Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal/poll: writeConsole discards error on windows #19068

Closed
davecheney opened this issue Feb 13, 2017 · 4 comments
Closed

internal/poll: writeConsole discards error on windows #19068

davecheney opened this issue Feb 13, 2017 · 4 comments

Comments

@davecheney
Copy link
Contributor

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version devel +15c62e8 Mon Feb 13 20:10:19 2017 +0000 darwin/amd64

What operating system and processor architecture are you using (go env)?

darwin/amd64

What did you do?

While reviewing 3792db5 I spotted this potential error

https://github.com/golang/go/blob/master/src/internal/poll/fd_windows.go#L625

What did you expect to see?

                    err := syscall.WriteConsole(fd.Sysfd, &uint16s[0], uint32(len(uint16s)), &written, nil)
                    if err != nil {
                            return 0, err
                    }

What did you see instead?

                    err = syscall.WriteConsole(fd.Sysfd, &uint16s[0], uint32(len(uint16s)), &written, nil)
                    if err != nil {
                            return 0, nil
                    }
@gopherbot
Copy link

CL https://golang.org/cl/36935 mentions this issue.

@ianlancetaylor
Copy link
Contributor

Thanks for spotting that. The error was in fact faithfully copied into internal/poll from its previous existence in os, where it was added back in https://golang.org/cl/6488044 (18601f8).

I sent CL 36935 to fix it.

@ianlancetaylor ianlancetaylor self-assigned this Feb 13, 2017
@davecheney
Copy link
Contributor Author

davecheney commented Feb 13, 2017 via email

@alexbrainman
Copy link
Member

Thank you everyone

Alex

@golang golang locked and limited conversation to collaborators Feb 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants