On Sun, 27 Mar 2005 11:59:34 -0500, William
<wh******@student.cs.uwaterloo.ca> wrote in comp.lang.c++:
For the following code snippet:
for ( ;; ) {
numFDInSet = select( fdmax+1, &readfds, NULL, NULL, &tv );
// ...
signal( SIGALRM, alarm_handler );
// ...
ualarm( waitPeriod * 1000, 0 );
}
The problem being if the alarm goes off when select() is scanning the
FD_SET, select is interruped with the following error:
Error on select(): Interrupted system call
Ideally, when the alarm goes off, I would still want select() to continue
scanning the FD_SET and the "main loop" to continue ( select() is inside
the main loop ). Any suggestions to achieving achieving this is
appreicated.
There are no functions named select or ualarm defined by the C++
language. These are extensions provided by your particular
compiler/operating system combination, not the language. You need to
ask in a group that supports that combination.
There isn't enough information in your post's headers for me to tell
for sure, so I'll suggest a few possibilities:
news:comp.os.linux.development.apps for Linux
news:comp.unix.programmer for UNIX variants
news:comp.os.ms-windows.programmer.win32 for Windows
--
Jack Klein
Home:
http://JK-Technology.Com
FAQs for
comp.lang.c
http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++
http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html