Strange Loop..

From: The Merciless Lord of Everything (serces@mud.dk)
Date: 05/04/99


Hi all

Lately (After my last update of everything...) my mud decided NOT to let
anyone in, but only on this RedHat 5.0 running on a DX4100Mhz, on any
other machine (Even other RH5.0's) it works like a dream, leads me to
believe that it is the machine that is fscked somehow, but I tracked it
down to the following part in comm.c

Around line 624 or so I find the following Loop:
-- *SNIP* --
do {
  if (select(0, (fd_set *) 0, (fd_set *) 0, (fd_set *) 0, &timeout) < 0) {
    if (errno != EINTR) {
      perror("Select sleep");
      exit(1);
    }
  }
  gettimeofday(&now, (struct timezone *) 0);
  timeout = timediff(last_time, now);
} while (timeout.tv_usec || timeout.tv_sec);
-- *SNIP* --

Somehow (And this is the Weird part) on this machine it NEVER got out of
this loop, It entered but never got out. Another machine, No problem, runs
straight through this loop. So after having thought a lot over what on
earth this loop really does I finally concluded that it doesn't do
anything, cept maybe pauses something (Not that I can see what). So I
finally decided to give in and kill the loop, thereby changing the
function to:

-- *SNIP* --
if (select(0, (fd_set *) 0, (fd_set *) 0, (fd_set *) 0, &timeout) < 0) {
  if (errno != EINTR) {
    perror("Select sleep");
    exit(1);
  }
}
-- *SNIP* --

compile, Run and everything works perfect, This comm.c is from an old
bpl11, so it might be that it has changed, but could someone enlighten me
*WHAT* this loop REALLY does??

Regards

Serces


"The Law of Self Sacrifice"
When you starve with a tiger, the tiger starves last.


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST