I’m fixing a piece of code that was written a bit before my time on
this project and I have a question about select() and timeouts. At
one point in the code there is a line like
n = select(1, &fds, NULL, NULL, &tvTimeout)
along with the comment text
“In the call to select(), QNX modifies tvTimeout. It needs to be
reset every time”
Is that true? I don’t know what the orgins of this code are (possibly
it’s ported QNX4 code) but currently its supposed to be running under
QNX 6.2. I’ve looked at the help-viewer documentation for select()
and I didn’t see any mention of select() modifying the timeout
parameter. I’m hoping that means it doesn’t and the comment in the
code is in error. Can someone verify that for me?
I’m fixing a piece of code that was written a bit before my time on
this project and I have a question about select() and timeouts. At
one point in the code there is a line like
n = select(1, &fds, NULL, NULL, &tvTimeout)
along with the comment text
“In the call to select(), QNX modifies tvTimeout. It needs to be
reset every time”
Is that true? I don’t know what the orgins of this code are (possibly
it’s ported QNX4 code) but currently its supposed to be running under
QNX 6.2. I’ve looked at the help-viewer documentation for select()
and I didn’t see any mention of select() modifying the timeout
parameter. I’m hoping that means it doesn’t and the comment in the
code is in error. Can someone verify that for me?