[ale]EIO on ioctl()

Chris Fowler cfowler at outpostsentinel.com
Tue Nov 20 11:07:26 EST 2001


Ahhh,

I have found that:

ioctl(ttyfd, TIOCMIWAIT, TIOCM_CD);

will wait for a status change.  It does not wait for a particular status such as DCD high 
or DCD low.  To verify that status I need to operate in a loop:

int lines;

do
{
     ioctl(ttyfd, TIOCMIWAIT, TIOCM_CD);
     
    // Status chage
  
    ioctl(ttyfd, TIOCMGET, &line)
}
while(!(lines & TIOCM_CD);


I want to wait for DCD high and not a change of DCD on the port.  Originally if
DCD was high and terminal was turned off, this function would return.  I need
only to return with DCD high.  Problem: second ioctl seems to produce and
EIO error.  (Input/Output).  Port is opened in NONBLOCK.  Should I do something
different?

Thanks,
Chris




---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list