select() timeout question

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?


Thanks in advance,


Charlie Hubbard

It isn’t modified under QNX6.

-seanb

charles.hubbard@pnl.gov wrote:

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?



Thanks in advance,

Charlie Hubbard

On 8 Oct 2003 17:54:38 GMT, Sean Boudreau <seanb@node25.ott.qnx.com>
wrote:

It isn’t modified under QNX6.

-seanb

I was hoping that was the case. Thank you for the swift reply!


Charlie Hubbard