]> granicus.if.org Git - icinga2/commitdiff
Bugfix: Fixed incorrect variable name.
authorGunnar Beutner <gunnar.beutner@netways.de>
Fri, 8 Feb 2013 09:30:32 +0000 (10:30 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Fri, 8 Feb 2013 09:30:32 +0000 (10:30 +0100)
lib/base/application.cpp

index e34f2fcb503cbbd8bb8ab185ef4eed71b1b35926..aff46e37817985a86e85bdb93e4ec9bb5922521a 100644 (file)
@@ -460,11 +460,11 @@ void Application::UpdatePidFile(const String& filename)
 
 #ifdef F_GETFL
                int flags;
-               flags = fcntl(fd, F_GETFL, 0);
+               flags = fcntl(fileno(m_PidFile), F_GETFL, 0);
                if (flags < 0)
                        BOOST_THROW_EXCEPTION(PosixException("fcntl failed", errno));
 
-               if (fcntl(fd, F_SETFL, flags | FD_CLOEXEC) < 0)
+               if (fcntl(fileno(m_PidFile), F_SETFL, flags | FD_CLOEXEC) < 0)
                        BOOST_THROW_EXCEPTION(PosixException("fcntl failed", errno));
 #endif /* FD_CLOEXEC */