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

Cancel linenoise input on signal, I/O error, or close (read 0). #101

Open
npat-efault opened this issue Aug 15, 2015 · 0 comments
Open

Cancel linenoise input on signal, I/O error, or close (read 0). #101

npat-efault opened this issue Aug 15, 2015 · 0 comments

Comments

@npat-efault
Copy link

If the user, when entering a line, presses C-c, the operation is canceled, and, effectivelly, linenoise() returns NULL. This is the correct behavior IMHO.

On the other hand, if, when entering a line, a signal is received or an input error is encountered, or if the channel is closed (read(2) returns 0), then linenoise() returns the partial line without any indication that something went wrong.

I think the following patch (or something along these lines) should be applied to correct this:

npat-efault/picocom@352ed00bc0

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

No branches or pull requests

1 participant