linenoise icon indicating copy to clipboard operation
linenoise copied to clipboard

linenoise() always returns -1 on UserLAnd

Open cosmos72 opened this issue 4 years ago • 0 comments

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 ?

cosmos72 avatar Mar 11 '20 10:03 cosmos72