mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
Disable fifo console on non-Unix
This commit is contained in:
parent
bd5fd4ec6e
commit
1a8e713e45
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue