[icinga-checkins] icinga.org: icinga2/master: Build fix.
git at icinga.org
git at icinga.org
Wed Feb 13 07:49:29 CET 2013
Module: icinga2
Branch: master
Commit: 800750c41514e6bbbd5637e89211f3de8c72ba55
URL: https://git.icinga.org/?p=icinga2.git;a=commit;h=800750c41514e6bbbd5637e89211f3de8c72ba55
Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date: Wed Feb 13 07:48:08 2013 +0100
Build fix.
---
lib/base/process.cpp | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/lib/base/process.cpp b/lib/base/process.cpp
index 4e60961..8c1aa02 100644
--- a/lib/base/process.cpp
+++ b/lib/base/process.cpp
@@ -318,11 +318,18 @@ void Process::InitTask(void)
#ifndef HAVE_PIPE2
int flags;
- flags = fcntl(childTaskFd, F_GETFL, 0);
+ flags = fcntl(fds[0], F_GETFL, 0);
if (flags < 0)
BOOST_THROW_EXCEPTION(PosixException("fcntl failed", errno));
- if (fcntl(childTaskFd, F_SETFL, flags | O_NONBLOCK | O_CLOEXEC) < 0)
+ if (fcntl(fds[0], F_SETFL, flags | O_NONBLOCK | O_CLOEXEC) < 0)
+ BOOST_THROW_EXCEPTION(PosixException("fcntl failed", errno));
+
+ flags = fcntl(fds[1], F_GETFL, 0);
+ if (flags < 0)
+ BOOST_THROW_EXCEPTION(PosixException("fcntl failed", errno));
+
+ if (fcntl(fds[1], F_SETFL, flags | O_NONBLOCK | O_CLOEXEC) < 0)
BOOST_THROW_EXCEPTION(PosixException("fcntl failed", errno));
#endif /* HAVE_PIPE2 */
More information about the icinga-checkins
mailing list