Fixed exception in command pipe thread after sending Icinga SIGTERM.

This commit is contained in:
Gunnar Beutner 2013-02-10 12:28:27 +01:00
parent 7484b4682a
commit dd93206113
1 changed files with 5 additions and 1 deletions

View File

@ -129,7 +129,11 @@ void CompatComponent::CommandPipeThread(const String& commandPath)
BOOST_THROW_EXCEPTION(PosixException("mkfifo() failed", errno)); BOOST_THROW_EXCEPTION(PosixException("mkfifo() failed", errno));
for (;;) { 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) if (fd < 0)
BOOST_THROW_EXCEPTION(PosixException("open() failed", errno)); BOOST_THROW_EXCEPTION(PosixException("open() failed", errno));