Disable command pipe functionality on Windows.

This commit is contained in:
Gunnar Beutner 2013-01-22 08:47:56 +01:00
parent c20ae866b7
commit ecb044b679
2 changed files with 11 additions and 4 deletions

View File

@ -84,8 +84,10 @@ void CompatComponent::Start(void)
m_StatusTimer->Start();
m_StatusTimer->Reschedule(0);
#ifndef _WIN32
m_CommandThread = thread(boost::bind(&CompatComponent::CommandPipeThread, this, GetCommandPath()));
m_CommandThread.detach();
#endif /* _WIN32 */
}
/**
@ -95,6 +97,7 @@ void CompatComponent::Stop(void)
{
}
#ifndef _WIN32
void CompatComponent::CommandPipeThread(const String& commandPath)
{
(void) unlink(commandPath.CStr());
@ -178,6 +181,7 @@ void CompatComponent::ProcessCommand(const String& command)
vector<String> argvExtra(argv.begin() + 1, argv.end());
ExternalCommand::Execute(argv[0], argvExtra);
}
#endif /* _WIN32 */
void CompatComponent::DumpHostStatus(ofstream& fp, const Host::Ptr& host)
{

View File

@ -33,16 +33,19 @@ public:
virtual void Stop(void);
private:
Timer::Ptr m_StatusTimer;
#ifndef _WIN32
thread m_CommandThread;
void CommandPipeThread(const String& commandPath);
void ProcessCommand(const String& command);
#endif /* _WIN32 */
Timer::Ptr m_StatusTimer;
String GetStatusPath(void) const;
String GetObjectsPath(void) const;
String GetCommandPath(void) const;
void CommandPipeThread(const String& commandPath);
void ProcessCommand(const String& command);
void DumpHostStatus(ofstream& fp, const Host::Ptr& host);
void DumpHostObject(ofstream& fp, const Host::Ptr& host);