Disable fifo console on non-Unix

This commit is contained in:
def 2013-08-06 06:44:53 +02:00
parent bd5fd4ec6e
commit 1a8e713e45
3 changed files with 8 additions and 2 deletions

View file

@ -8,12 +8,11 @@
#include <sys/types.h>
#include <sys/stat.h>
#if defined(CONF_FAMILY_UNIX)
FifoConsole::FifoConsole(IConsole *pConsole)
{
void *m_pFifoThread = thread_create(ListenFifoThread, pConsole);
#if defined(CONF_FAMILY_UNIX)
pthread_detach((pthread_t)m_pFifoThread);
#endif
}
FifoConsole::~FifoConsole()
@ -43,3 +42,4 @@ void FifoConsole::ListenFifoThread(void *pUser)
f.close();
}
}
#endif

View file

@ -3,6 +3,7 @@
#include <engine/console.h>
#if defined(CONF_FAMILY_UNIX)
class FifoConsole
{
static void ListenFifoThread(void *pUser);
@ -12,5 +13,6 @@ public:
FifoConsole(IConsole *pConsole);
~FifoConsole();
};
#endif
#endif // FILE_ENGINE_FIFOCONSOLE_H

View file

@ -1852,14 +1852,18 @@ int main(int argc, const char **argv) // ignore_convention
pEngine->InitLogfile();
#if defined(CONF_FAMILY_UNIX)
FifoConsole *fifoConsole = new FifoConsole(pConsole);
#endif
// run the server
dbg_msg("server", "starting...");
pServer->Run();
// free
#if defined(CONF_FAMILY_UNIX)
delete fifoConsole;
#endif
delete pServer;
delete pKernel;
delete pEngineMap;