1 diff --git a/daemon/main/nzbget.cpp b/daemon/main/nzbget.cpp
2 index 1cfa105..b5cee58 100644
3 --- a/daemon/main/nzbget.cpp
4 +++ b/daemon/main/nzbget.cpp
12 #include "ServerPool.h"
14 @@ -913,7 +915,7 @@ void NZBGet::Daemonize()
15 error("Starting daemon failed: could not create lock-file %s", m_options->GetLockFile());
18 - if (lockf(lfp, F_TLOCK, 0) < 0)
19 + if (flock(lfp, LOCK_EX) < 0)
21 error("Starting daemon failed: could not acquire lock on lock-file %s", m_options->GetLockFile());