[Mauiusers] maui event loop almost using polling

Ronny T. Lampert telecaadmin at gmail.com
Mon Jan 8 03:25:04 MST 2007


Hi,

when tracing maui to see why something went wrong I saw the following
repeating itself again and again even if maui is "idle" (this is on 
Linux and Torque RM):

time([1166888018])                      = 1166888018
select(1024, [9], NULL, NULL, {0, 10000}) = 0 (Timeout)
accept(6, 0xbfcf0500, [16])             = -1 EAGAIN (Resource
temporarily unavailable)
select(0, NULL, NULL, NULL, {0, 100000}) = 0 (Timeout)
time([1166888018])                      = 1166888018
select(1024, [9], NULL, NULL, {0, 10000}) = 0 (Timeout)
accept(6, 0xbfcf0500, [16])             = -1 EAGAIN (Resource
temporarily unavailable)
select(0, NULL, NULL, NULL, {0, 100000}) = 0 (Timeout)
time([1166888018])                      = 1166888018

This seems to be the main event loop; accept() furthermore seems to be
called on a non-existing connection socket.

I think this could be made more correct by

1) including the network socket (6 above) into the select, thus
2) only calling accept when there is a connection, and
3) increasing the struct timeval timeout to select


Or do I miss something?

Cheers,
Ronny


More information about the mauiusers mailing list