don't call revents on zombified files

This commit is contained in:
Alexandre Ratchov 2013-01-05 16:21:48 +01:00
parent 4a42e90267
commit 55c6148e0b
1 changed files with 2 additions and 1 deletions

View File

@ -383,7 +383,8 @@ file_poll(void)
#ifdef DEBUG
clock_gettime(CLOCK_MONOTONIC, &ts0);
#endif
revents = f->ops->revents(f->arg, f->pfd);
revents = (f->state != FILE_ZOMB) ?
f->ops->revents(f->arg, f->pfd) : 0;
if ((revents & POLLHUP) && (f->state != FILE_ZOMB))
f->ops->hup(f->arg);
if ((revents & POLLIN) && (f->state != FILE_ZOMB))