Fix for GitHub issue #122 and other fixes

This commit is contained in:
Adam Ierymenko 2014-09-18 10:01:30 -07:00
parent 924f030994
commit 4708231046
8 changed files with 102 additions and 35 deletions

View file

@ -493,9 +493,9 @@ Node::ReasonForTermination Node::run()
lastShutdownIfUnreadableCheck = now;
if (Utils::fileExists(shutdownIfUnreadablePath.c_str(),false)) {
int tmpfd = ::open(shutdownIfUnreadablePath.c_str(),O_RDONLY,0);
if (tmpfd < 0)
if (tmpfd < 0) {
return impl->terminateBecause(Node::NODE_NORMAL_TERMINATION,"shutdownIfUnreadable exists but is not readable");
else ::close(tmpfd);
} else ::close(tmpfd);
}
}
#endif