From 1925e4f979950e986d99a236ab744f0de109c927 Mon Sep 17 00:00:00 2001 From: avl42 Date: Sat, 22 Jul 2017 22:49:41 +0000 Subject: Make it work again with new epoll Notifier Warning: might need some more tweaks if it turns out to break other uses. --- unix/tclEpollNotfy.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/unix/tclEpollNotfy.c b/unix/tclEpollNotfy.c index 088f314..9815fb0 100644 --- a/unix/tclEpollNotfy.c +++ b/unix/tclEpollNotfy.c @@ -220,7 +220,10 @@ PlatformEventsControl( struct stat fdStat; newEvent.events = 0; - if (filePtr->mask & (TCL_READABLE | TCL_EXCEPTION)) { + if (filePtr->mask & TCL_EXCEPTION) { + newEvent.events |= EPOLLERR; + } + if (filePtr->mask & TCL_READABLE) { newEvent.events |= EPOLLIN; } if (filePtr->mask & TCL_WRITABLE) { @@ -241,9 +244,9 @@ PlatformEventsControl( * associated with regular files belonging to tsdPtr. */ - if (fstat(filePtr->fd, &fdStat) == -1) { + if (0 && fstat(filePtr->fd, &fdStat) == -1) { Tcl_Panic("fstat: %s", strerror(errno)); - } else if ((fdStat.st_mode & S_IFMT) == S_IFREG) { + } else if (0 && (fdStat.st_mode & S_IFMT) == S_IFREG) { switch (op) { case EPOLL_CTL_ADD: if (isNew) { -- cgit v0.12