MUTEX_INIT();
main(int argc, char *argv[]){	FD	*f;	int	fd;	fd_set	localFDSet;	int	ret;	fd = netListen(NULL, NULL, &mainPort);	if (fd < 0)	{		fprintf(stderr, "netListen failed\n");		return 1;	}	f = addFD(fd, acceptNewLogger);	if (!f)	{		fprintf(stderr, "addFD failed\n");		return 1;	}	while (1)	{		localFDSet = fdSet;		ret = select(maxFD + 1, &localFDSet, NULL, NULL, NULL);		if (ret == -1)		{			perror("select");		}		for (fd = 0; fd <= maxFD; fd++)		{			if (FD_ISSET(fd, &localFDSet))			{				if ((*table[fd]->handler)(fd))				{					for (fd = 0; fd <= maxFD; fd++)					{						removeFD(fd);					}					return 0;				}			}		}	}	return 1;}