-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
cmd/pprof: Control-C does not exit interactive mode #27147
Comments
Another weird behavior is that pressing |
Yes, that's the regression due to the readline changes. I think it's desirable for the upstream pprof and the go tool pprof to to go with the |
We obviously missed this for 1.12 :) These little readline issues bite me at least once a week - I'd almost give up the possibility to walk up the history to just fix these bugs. So I do think we should fix it for 1.13. Remind me - what's the issue with Also, I assume that the reason we don't want a third-party terminal package inside Go is bloat. Why not go the other way, and have the third-party pprof tool use the same readline library as the one in |
Update: I gave up my original plan of using the third-party terminal package. Sent a PR to upstream to be compatible with our builders and didn't get responses. I now think depending on third-party packages that we can't fix quickly doesn't seem like a good idea. Let's fix golang.org/x/crypto/ssh/terminal. My concern on this package was, it's minimal and has been a less popular choice among go users - meaning less chances of being tested. But at least, it allows us to maintain the source and fix bugs promptly. |
Sorry for the delay. |
Change https://golang.org/cl/222342 mentions this issue: |
The situation didn't change much - go builders do not like the new dependency, and we need help from github.com/chzyer/readline maintainers to address the issues or accept PRs. |
Change https://golang.org/cl/228223 mentions this issue: |
ctrl+C: terminate readline, which may result in application termination. ctrl+F: keyRight ctrl+B: keyLeft Update golang/go#27147 Change-Id: If319ef79708b98c030cbce102400a785d15137f8 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/228223 Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org>
Change https://golang.org/cl/228226 mentions this issue: |
Obviously I gave up my plan to switch the readline dependency and addressed the issue in the golang.org/x/crypto/ssh/terminal package. I am not sure about the behavior of 'Ctrl+D' mentioned in #27147 (comment) yet |
If ^C works, I don't mind the ^D behavior as much. I was only trying it as an alternative to exit the prompt when there's a line written. |
ctrl+C: terminate readline, which may result in application termination. ctrl+F: keyRight ctrl+B: keyLeft Update golang/go#27147 Change-Id: If319ef79708b98c030cbce102400a785d15137f8 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/228223 Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
No - works fine on
go version go1.10.3 linux/amd64
.What operating system and processor architecture are you using (
go env
)?What did you do?
What did you expect to see?
The same that I see via Go 1.10:
What did you see instead?
^C
having no effect whatsoever. The only way to exit is now to typeexit
, or^D
(EOF).I presume this is a regression in 1.11, likely because of all the readline changes that were retrofitted into
go tool pprof
. cc @hyangahMilestoning for 1.12 for now, but this is a regression in a way.
The text was updated successfully, but these errors were encountered: