mirror of
https://github.com/Icinga/icinga2.git
synced 2025-06-26 16:34:30 +02:00
Win32 build fix.
This commit is contained in:
parent
3c972b9793
commit
7807b87ff5
@ -419,6 +419,7 @@ void Application::UpdatePidFile(const string& filename)
|
|||||||
if (m_PidFile == NULL)
|
if (m_PidFile == NULL)
|
||||||
throw runtime_error("Could not open PID file '" + filename + "'");
|
throw runtime_error("Could not open PID file '" + filename + "'");
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
if (flock(fileno(m_PidFile), LOCK_EX | LOCK_NB) < 0) {
|
if (flock(fileno(m_PidFile), LOCK_EX | LOCK_NB) < 0) {
|
||||||
ClosePidFile();
|
ClosePidFile();
|
||||||
|
|
||||||
@ -426,6 +427,7 @@ void Application::UpdatePidFile(const string& filename)
|
|||||||
"already running. Remove the '" + filename + "' file if "
|
"already running. Remove the '" + filename + "' file if "
|
||||||
"you're certain that this is not the case.");
|
"you're certain that this is not the case.");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
pid_t pid = getpid();
|
pid_t pid = getpid();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user