+ while (byte < end)
+ {
+ struct inotify_event* event = (struct inotify_event*)byte;
+
+ if (event->mask & IN_IGNORED)
+ {
+ log_warning("watch", event->wd, "removed");
+ }
+
+ log_error("2");
+ hash<int,std::string,hash_function>::iterator it;
+ it = monitor_lookup_.find(event->wd);
+ if (it != monitor_lookup_.end())
+ {
+ log_error("3");
+ std::string path = (*it).second;
+ monitor_lookup_.erase(it);
+ resource::reload(path);
+ }
+
+ byte += sizeof(*event) + event->len;
+
+ ++num_resources;
+ }
+ }
+#endif
+
+ return num_resources;