mirror of https://github.com/Icinga/icinga2.git
Fixed exception in command pipe thread after sending Icinga SIGTERM.
This commit is contained in:
parent
7484b4682a
commit
dd93206113
|
@ -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));
|
||||||
|
|
Loading…
Reference in New Issue