Break when watch desc becomes 0

This commit is contained in:
Arun Prakash Jana 2019-03-20 05:50:20 +05:30
parent 58a7773755
commit b0960a2e3d
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -1454,11 +1454,16 @@ static int nextsel(int presel)
event = (struct inotify_event *) ptr; event = (struct inotify_event *) ptr;
DPRINTF_D(event->wd); DPRINTF_D(event->wd);
DPRINTF_D(event->mask); DPRINTF_D(event->mask);
if (!event->wd)
break;
if (event->mask & INOTIFY_MASK) { if (event->mask & INOTIFY_MASK) {
c = CONTROL('L'); c = CONTROL('L');
DPRINTF_S("issue refresh");
break; break;
} }
} }
DPRINTF_S("inotify read done");
} }
} }
#elif defined(BSD_KQUEUE) #elif defined(BSD_KQUEUE)