From dd93206113c14a7c601b1ca8443b34e20fe1ce65 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sun, 10 Feb 2013 12:28:27 +0100 Subject: [PATCH] Fixed exception in command pipe thread after sending Icinga SIGTERM. --- components/compat/compatcomponent.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/compat/compatcomponent.cpp b/components/compat/compatcomponent.cpp index 1aef5b0fb..48c2207a6 100644 --- a/components/compat/compatcomponent.cpp +++ b/components/compat/compatcomponent.cpp @@ -129,7 +129,11 @@ void CompatComponent::CommandPipeThread(const String& commandPath) BOOST_THROW_EXCEPTION(PosixException("mkfifo() failed", errno)); for (;;) { - int fd = open(commandPath.CStr(), O_RDONLY); + int fd; + + do { + fd = open(commandPath.CStr(), O_RDONLY); + } while (fd < 0 && errno == EINTR); if (fd < 0) BOOST_THROW_EXCEPTION(PosixException("open() failed", errno)); -- 2.40.0