From 55c6148e0bf84ac1ecd8547aea47aa0fbf2632b3 Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Sat, 5 Jan 2013 16:21:48 +0100 Subject: [PATCH] don't call revents on zombified files --- sndiod/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sndiod/file.c b/sndiod/file.c index 8e2cc49..bb2fc99 100644 --- a/sndiod/file.c +++ b/sndiod/file.c @@ -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))