-
Notifications
You must be signed in to change notification settings - Fork 835
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
The input isn't verified before using epoll on it #964
Comments
This (most likely) causes the #797 |
cardil
added a commit
to cardil/bubbletea-964
that referenced
this issue
Mar 25, 2024
cardil
changed the title
Verify the input before using epoll on it
The input isn't verified before using epoll on it
Mar 25, 2024
cardil
added a commit
to cardil/knative-client-pkg
that referenced
this issue
Mar 25, 2024
cardil
added a commit
to cardil/knative-client-pkg
that referenced
this issue
Mar 26, 2024
cardil
added a commit
to cardil/knative-client-pkg
that referenced
this issue
Mar 26, 2024
cardil
added a commit
to cardil/knative-client-pkg
that referenced
this issue
Mar 26, 2024
cardil
added a commit
to cardil/knative-client-pkg
that referenced
this issue
Mar 26, 2024
cardil
added a commit
to cardil/knative-client-pkg
that referenced
this issue
Mar 26, 2024
cardil
added a commit
to cardil/knative-client-pkg
that referenced
this issue
Mar 26, 2024
cardil
added a commit
to cardil/knative-client-pkg
that referenced
this issue
Mar 26, 2024
cardil
added a commit
to cardil/knative-client-pkg
that referenced
this issue
Mar 26, 2024
cardil
added a commit
to cardil/knative-client-pkg
that referenced
this issue
Mar 26, 2024
knative-prow bot
pushed a commit
to knative/client-pkg
that referenced
this issue
Mar 26, 2024
* Bubbletea initialization error handling * Safe guard for charmbracelet/bubbletea#964
FYI: In Knative we walk around this issue with this function: https://github.com/knative/client-pkg/blob/ca64d2dc74eb7189060b3e39399d317ea402e35c/pkg/output/tui/bubbletea964.go#L30-L49 |
sourishkrout
added a commit
to stateful/runme
that referenced
this issue
Apr 5, 2024
Turns out bubbletea errors when handed a non-tty stdin on Linux. charmbracelet/bubbletea#964 This prevent the `run` command from running into this scenario.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Bubbletea doesn't validate given
input
, before trying to use epoll on it:bubbletea/tty.go
Line 55 in 7199a7f
When running processes, Golang (maybe other langs as well?) gives by default the
/dev/null
as the stdin.This in turn causes a cryptic epoll error, as the
/dev/null
doesn't support epoll:You could use muesli/cancelreader#13 to see the underlying
syscall.Errno: EPERM
. Looking at epoll_ctl(2), theEPERM
is returned if:Setup
Please complete the following information along with version numbers, if applicable.
To Reproduce
Steps to reproduce the behavior:
go test -count=1 ./spin2sec_test.go
TestSpin2SecFailing
test failing, with error:Expected behavior
Bubbletea should address a common case of having
/dev/null
as input, and not feed it to epoll-based reader.Walk around
To walk away of this problem, one might consider giving an empty buffer as process stdin. See, an example: wavesoftware/go-magetasks@7496084.
The text was updated successfully, but these errors were encountered: