summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravl42 <avl@logic.at>2017-07-22 22:49:41 (GMT)
committeravl42 <avl@logic.at>2017-07-22 22:49:41 (GMT)
commit1925e4f979950e986d99a236ab744f0de109c927 (patch)
tree61e316a1bf0e187da7571be11278dc0c682e9f25
parent6894c7fb0f40998e6ca6b250603ed5e6c74e0ec1 (diff)
downloadtcl-tip_469.zip
tcl-tip_469.tar.gz
tcl-tip_469.tar.bz2
Make it work again with new epoll Notifiertip_469
Warning: might need some more tweaks if it turns out to break other uses.
-rw-r--r--unix/tclEpollNotfy.c9
1 files 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) {