Re: [LONG]Strange Loop

From: George Greer (
Date: 05/20/00

On Sat, 20 May 2000, Chris Gilbert wrote:

>>  As you said in your first reply, if select returns an error, null_time
>> could become undefined, so is using null_time in this way a bad thing?
>> Or is my MUD host the problem? I can put in a throwaway timeval struct,
>> setup like null_time, so null_time isn't trashed, but is this the right
>> way to go about it?
>maybe your select needs this but it sound's like a bug with select, as
>patrick suggested try updating the kernel.

--- 8< ---
On Linux, timeout is modified to reflect the amount of time not slept; most
other implementations do not do this.  This causes problems both when Linux
code which reads timeout is ported to other operating systems, and when
code is ported to Linux that reuses a struct timeval for multiple selects
in a loop without reinitializing it.  Consider timeout to be undefined
after select returns.
--- 8< ---

However, you guys snipped the code segment and I'm replying in backwards
order so I don't have the code handy to see if that applies.

That might only apply to Linux 2.0.x, I can't remember if it was changed.

George Greer

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 04/10/01 PDT