-
-
Notifications
You must be signed in to change notification settings - Fork 269
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
Stdin becomes paused at close only when using StdinDiscarder
with TTY
#209
Comments
Reopened because of #211 |
Just to document it, here's another possible solution I tried that ended up a dead end: Since
That sort of works, but there's an important caveat: when the proxy stream is discarded, either by Ultimately, I decided this solution was too finicky to contribute as it is not significantly better than just calling |
When ora uses its
StdinDiscarder
,stdin
will be paused when the discarder is stopped (on all platforms except windows). This is due to a historic, undocumented implementation detail ofnode:readline
, where callingreadline.close()
causes the input stream (stdin
) to be paused. Thus, this propagates up toStdinDiscarder
when it callsclose
on itsreadline
handle.I feel like this behavior seems like a bug in
ora
, unintentionally present due to the side-effect fromnode:readline
. It feels inconsistent thatstdin
would be paused at the very end ofora
's lifecycle only on the condition of using a tty and theStdinDiscarder
. I would expectstdin
to remain unpaused at the end ofora
's lifecycle regardless of those conditions.The text was updated successfully, but these errors were encountered: