Description
In LinuxTermiosMapping.java, the PENDIN local flag constant is incorrect.
Current value (wrong):
private static final int PENDIN = 0x0002000; // = 8192
Correct value (from Linux asm-generic/termbits.h):
private static final int PENDIN = 0x0004000; // = 16384
The Linux kernel defines PENDIN as octal 0100000 = hex 0x4000, but the code has 0x2000.
Impact
Currently low — JLine uses this constant symmetrically in toTermios() and toAttributes(), so the wrong value roundtrips correctly. However, if JLine ever needs to interoperate with termios structs set by other programs (e.g. reading terminal state set by the shell), this flag would be silently lost.
Origin
This is a pre-existing bug inherited from LinuxNativePty.java. It was copied as-is during the refactor in #1828.
File
terminal-jni/src/main/java/org/jline/terminal/impl/jni/linux/LinuxTermiosMapping.java line 100
Related
Description
In
LinuxTermiosMapping.java, thePENDINlocal flag constant is incorrect.Current value (wrong):
Correct value (from Linux
asm-generic/termbits.h):The Linux kernel defines
PENDINas octal0100000= hex0x4000, but the code has0x2000.Impact
Currently low — JLine uses this constant symmetrically in
toTermios()andtoAttributes(), so the wrong value roundtrips correctly. However, if JLine ever needs to interoperate with termios structs set by other programs (e.g. reading terminal state set by the shell), this flag would be silently lost.Origin
This is a pre-existing bug inherited from
LinuxNativePty.java. It was copied as-is during the refactor in #1828.File
terminal-jni/src/main/java/org/jline/terminal/impl/jni/linux/LinuxTermiosMapping.javaline 100Related