linenoise
linenoise copied to clipboard
linenoise() always returns -1 on UserLAnd
UserLAnd is an Android app to install stock Linux distributions on a smartphone. For example, I use it to have a native Debian GNU/Linux arm64 development system on my phone.
Unluckily, on such system tcsetattr(fd,TCSAFLUSH, ...)
fails with errno = EPERM
, causing linenoise()
to immediately return -1 without reading from the terminal.
As a workaround, I had to replace it with tcsetattr(fd,TCSANOW, ...)
Does it make sense to always use TCSANOW
instead of TCSAFLUSH
?