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
Assignees

Comments

@davecheney
Copy link
Contributor

@davecheney davecheney commented Feb 13, 2017

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

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Feb 13, 2017

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

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Feb 13, 2017

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

This comment has been minimized.

Copy link
Contributor Author

@davecheney davecheney commented Feb 13, 2017

@gopherbot gopherbot closed this in 83c58ac Feb 13, 2017
@alexbrainman

This comment has been minimized.

Copy link
Member

@alexbrainman alexbrainman commented Feb 14, 2017

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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.