while( serverState < SHUTDOWN )
while( Server::instance()->getState() < SHUTDOWN )
	virtual void run()	{		try		{			setNonBlockingIo();			signal( SIGHUP,  &signal_handler ); // Reload Scripts			signal( SIGUSR1, &signal_handler ); // Save World			signal( SIGUSR2, &signal_handler ); // Reload Accounts			signal( SIGTERM, &signal_handler ); // Terminate Server			signal( SIGPIPE, SIG_IGN );			// Ignore SIGPIPE			if( !Getopts::instance()->isDaemon() )			{				while( serverState < SHUTDOWN )				{					// Do a select operation on the stdin handle and see					// if there is any input waiting.					fd_set consoleFds;					FD_ZERO( &consoleFds );					FD_SET( STDIN_FILENO, &consoleFds );					timeval tvTimeout;					tvTimeout.tv_sec = 0;					tvTimeout.tv_usec = 1;					if( select( 1, &consoleFds, 0, 0, &tvTimeout ) > 0 )					{						char c = fgetc( stdin );						if( c > 0 && serverState == RUNNING )						{							Console::instance()->queueCommand( QChar( c ) );						}					}					else					{						msleep( 100 );					}				}			}		}		// If there is any error: Quit.		// It's better to have no console input		// than a deadlocking server.		catch( ... )		{		}	}