Skip to contentSkip to conversation

TIOCMIWAIT hopelessly broken?

DISCUSSION Adam Goode 1 participant 1 message Mar 14, 2009 TTY layer and serial drivers

lore
Share & tools
lore

Adam Goode

author
#0 lore raw

Hi,

The ioctl TIOCMIWAIT seems to be inadequate for tracking changes in the modem status lines. The main problem is that it cannot be used without
racing: if the status change you are waiting for happens before your ioctl, you will wait forever.

A solution would be one like a eventfd, something that can be put to poll(), epoll(), or select(), and where you read the status changes with read().

Any ideas on how to do this? Would it be a new syscall, something in /sys, a flag to open() ?

Thanks,

Adam