Skip to content

expose access to JLine read calls #126

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

Open
KyleMcB opened this issue Jan 12, 2025 · 1 comment
Open

expose access to JLine read calls #126

KyleMcB opened this issue Jan 12, 2025 · 1 comment
Labels
enhancement New feature / functionality

Comments

@KyleMcB
Copy link

KyleMcB commented Jan 12, 2025

This request is specifically for usage in the shell I am writing that uses kotter.

My shell does not create a new tty for each new process. It actually shares its own stdin, stdout, stderr fds. I think all modern *nix shells create a new tty. I have read the source of a unix shell that just forked and exec'd, so this isn't a new way doing things...
Anyways, why is this a problem and why do I need a change in kotter?
When kross launches a child process and stops using its own in/out it has to deterministically stop reading. Else the shell will steal input bytes from the child process. The current api in kotter is a sharedflow that has a tight loop around calling read, so it will also call read again after the point I need it to stop

Describe alternatives you've considered
I also tried adding a way to inject a stop signal into the sharedflow, but the only thing I got to work is direct access to JLine's read call.

PR #125

@KyleMcB KyleMcB added the enhancement New feature / functionality label Jan 12, 2025
@bitspittle
Copy link
Member

FYI without power over here (in Southern California but in a totally safe place, they're just being cautious). Will review after getting power back, no idea when that will be. Thanks for the PR and explanation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature / functionality
Projects
None yet
Development

No branches or pull requests

2 participants