We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b9fe070 commit 1f1d6e5Copy full SHA for 1f1d6e5
1 file changed
NativeCode/SerialPortImpl.c
@@ -1174,6 +1174,10 @@ JNIEXPORT jint JNICALL Java_com_rm5248_serial_SerialPort_getSerialLineStateInter
1174
#else
1175
int get_val;
1176
if( ioctl( desc->port, TIOCMGET, &get_val ) < 0 ){
1177
+ /* TIOCMGET can fail on linux if not implemented(example: pty) */
1178
+ if( errno == EINVAL ){
1179
+ return 0;
1180
+ }
1181
throw_io_exception( env, errno );
1182
return -1;
1183
}
0 commit comments