tv.tv_usec = 0;
retval = select(highest + 1, &master_fds, NULL, NULL, &tv);
}
- else
- return NULL;
+ else {
+ retval = -1 ;
+ }
/* Now figure out who made this select() unblock.
* First, check for an error or exit condition.
continue;
}
}
- else if(retval == 0) {
- if (server_shutting_down) return(NULL);
- continue;
- }
+
/* Next, check to see if it's a new client connecting
* on a master socket.
*/
- else for (serviceptr = ServiceHookTable; serviceptr != NULL;
- serviceptr = serviceptr->next ) {
+ else if ((retval > 0) && (!server_shutting_down)) for (serviceptr = ServiceHookTable; serviceptr != NULL; serviceptr = serviceptr->next) {
if (FD_ISSET(serviceptr->msock, &master_fds)) {
ssock = accept(serviceptr->msock, NULL, 0);
}
}
CtdlClearSystemContext();
-
return NULL;
}
#include "commands.h"
#include "screen.h"
-int enable_status_line = 0;
+int enable_status_line = 0; /* FIXME the status line works, but not on Mac. Make this configurable. */
char status_line[1024] = " ";
/* the default paginator prompt will be replaced by the server's prompt when we learn it */