I think I''ve got it - are you doing like this:
fd_set readfs;
FD_ZERO(&readfs);
FD_SET(0, &readfs);
...
loop
tv.tv_sec = 0; tv.tv_usec = 10000;
...
if(!select(maxfd + 1, &readfs, 0, 0, &tv))
continue;
if(FD_ISSET(0, &readfs)) {
...
}
...
end loop
If so...that''s what''s causing the problem, you need to keep a "master copy" of the readfs since it''ll be changed in the loop.
fd_set readfs, master;
FD_ZERO(&master);
FD_SET(0, &master);
...
loop
tv.tv_sec = 0; tv.tv_usec = 10000;
readfs = master;
...
if(!select(maxfd + 1, &readfs, 0, 0, &tv))
continue;
...
if(FD_ISSET(0, &readfs)) {
...
}
if(FD_ISSET(your_listenfd, &readfs)) {
// accept connection...
FD_SET(newfd, &master); // change the master rather than the "temporary" copy
}
...
end loop
I''ll post the daemon stuff in a seperate message (netscape hangs once in a while, I don''t want to loose all this text now...
![](smile.gif)
)
"This album was written, recorded and edited at Gröndal, Stockholm in the year of 2000. At this point in time money still ruled the world. Capitalistic thoughts were wide spread. From the sky filled with the fumes of a billionarie''s cigar to the deepest abyss drenched in nuclear waste. A rich kid was a happy kid, oh..dirty, filthy times. Let this be a reminder."
- Fireside, taken from back of the Elite album