char c = fgetc( stdin ); if( c > 0 && serverState == RUNNING )
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 )
	virtual void run()	{		try		{			while( serverState < SHUTDOWN )			{				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( ... )		{		}	}