22 #include <tqeventloop.h>
24 DWORD WINAPI DCOPServer::TerminatorThread(
void * pParam)
26 DCOPServer * server = (DCOPServer*)pParam;
28 WaitForSingleObject(server->m_evTerminate,INFINITE);
29 fprintf( stderr,
"[dcopserver_win] Terminate event signaled\n" );
30 if(!server->shutdown) {
32 ResetEvent(server->m_evTerminate);
33 server->slotShutdown();
37 while(WaitForSingleObject(server->m_evTerminate,100) != WAIT_OBJECT_0)
38 TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput|TQEventLoop::ExcludeSocketNotifiers);
39 fprintf( stderr,
"[dcopserver_win] Terminated event signaled the last time\n" );
41 fprintf( stderr,
"[dcopserver_win] Terminate thread teminated\n" );
45 BOOL WINAPI DCOPServer::dcopServerConsoleProc(DWORD dwCtrlType)
50 case CTRL_BREAK_EVENT:
51 case CTRL_CLOSE_EVENT:
52 case CTRL_LOGOFF_EVENT:
53 case CTRL_SHUTDOWN_EVENT:
55 system(findDcopserverShutdown()+
" --nokill");