rustyline
rustyline copied to clipboard
Avoid EINTR in readline by repeating poll-call.
Fixes #402 by repeating the call on EINTR.
Thanks. But I am not sure we should loop.
- https://github.com/kkawakam/rustyline/blob/master/src/tty/unix.rs#L417 Here, we try to make the distinction between a single ESC and an escape sequence. I guess we can safely assume that a single ESC was received if an EINTR is raised.
- https://github.com/kkawakam/rustyline/blob/master/src/tty/unix.rs#L705 Here, we try to find the current cursor position. I guess we can safely assume that cursor position is OK if an EINTR is raised.
An EINTR
can be caused by any signal, including SIGSTOP
, SIGCHLD
, SIGWINCH
or SIGUSR1
.
An
EINTR
can be caused by any signal, includingSIGSTOP
,SIGCHLD
,SIGWINCH
orSIGUSR1
.
Indeed!
At least, we should not ignore SIGWINCH
.
See #420.