Is it possible to open a serial device (such as /dev/ttyS0
) and be informed via select
/poll
/etc... or a signal when the handshaking lines (such as CTS
/RTS
or DSR
/DTR
) change? I know at the hardware level there's an interrupt from the UART to tell the kernel it has changed, but can I be informed of that up in userland?
Edit: I am aware of TIOCMIWAIT
, but that ioctl
call blocks until the status lines change. I would like instead to keep processing generally and have a poll
or similar be informed on change, as well as other events.