Skip to content

Commit

Permalink
multicore: remove sprurious error logging from inotify directory monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
jjallaire committed Jun 3, 2011
1 parent 8a49fc8 commit 27b0e70
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/cpp/core/system/INotifyDirectoryMonitor.cpp
Expand Up @@ -177,12 +177,7 @@ Error DirectoryMonitor::checkForEvents(std::vector<FileChangeEvent>* pEvents)
eventType = FileChangeEvent::FileAdded;
else if (pEvent->mask & IN_MOVED_FROM)
eventType = FileChangeEvent::FileRemoved;
else
{
LOG_WARNING_MESSAGE("Unexpected event type from inotify: " +
boost::lexical_cast<std::string>(pEvent->mask));
}


// return event if we got a valid event type and the event applies to a
// child of the monitored directory (len == 0 occurs for root element)
if ((eventType != FileChangeEvent::None) && (pEvent->len > 0))
Expand Down Expand Up @@ -235,14 +230,9 @@ Error DirectoryMonitor::stop()
if (res < 0)
{
// invalid argument is expected if the directory is gone
if ((errno == EINVAL) && !pImpl_->directory.exists())
{
// don't set the error
}
else
{
// or the directory file descriptor is no longer valid
if (errno != EINVAL)
removeWatchError = systemError(errno, ERROR_LOCATION);
}
}

// reset watch descriptor
Expand Down

0 comments on commit 27b0e70

Please sign in to comment.