another possibility to wait for 0.1 sec is to use the select command:
struct timeval tv;
tv.tv_sec = 0;
tv.tv_usec = 100000;
select(0, NULL, NULL, NULL, &tv);
Please enter the man pages for more details.
PS: Perhaps one of you can answer my questions?!
at the moment I try to realize a serial connection between
a SUN computer and a PC, but the heterogenous system is not
the problem. As I read and heard, it seems that for example
a SUN ULTRA 1 with a RS-232C/RS-423 serial port might
have problems with baud rates higher than 19200.
1. question: Are there any drivers for Solaris 2.5.1 / 1.6
available to increase the baud rate, or other solutions?
Then I recognized by experiments that my SUN had no
problems to send and receive over port a with 38400, but
over port b I was able to send with 38400 but to receive
only with 19200.
2. question: Perhaps this "error" is the result of the entries
in /etc/remote where are some lines concerning the b-port
and Modem connection, or other reasons ?
Ok, last problem, first, the keyboard of another SUN
was connected to its serial port a, now it seems, that it is a problem
to receive over this port, sending is not a problem.
3. question: Perhaps there is a console-process which
gets any data that arrives at port a because of the previous
keyboard connection, how can I reconfigure it to be able
to receive data over a.