summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixNotfy.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-12-10 14:35:02 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-12-10 14:35:02 (GMT)
commitdfeacc8edb1494b531c9bdbe41a83aa89a557198 (patch)
tree69dd7e78adf1fb3a08a7cb6f4df655922eb05480 /unix/tclUnixNotfy.c
parent9ef7f0a940cdff5f1a7f0b8b77f82a10cae105f2 (diff)
downloadtcl-dfeacc8edb1494b531c9bdbe41a83aa89a557198.zip
tcl-dfeacc8edb1494b531c9bdbe41a83aa89a557198.tar.gz
tcl-dfeacc8edb1494b531c9bdbe41a83aa89a557198.tar.bz2
Fix [040586323610be22f8617962377324f4ddc9bc02|0405863236]: wrong field checked in struct pollfd in TclUnixWaitForFile
Diffstat (limited to 'unix/tclUnixNotfy.c')
-rw-r--r--unix/tclUnixNotfy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c
index 5bc753a..b7df740 100644
--- a/unix/tclUnixNotfy.c
+++ b/unix/tclUnixNotfy.c
@@ -532,13 +532,13 @@ TclUnixWaitForFile(
numFound = poll(pollFds, 1, pollTimeout);
if (numFound == 1) {
result = 0;
- if (pollFds[0].events & (POLLIN | POLLHUP)) {
+ if (pollFds[0].revents & (POLLIN | POLLHUP)) {
result |= TCL_READABLE;
}
- if (pollFds[0].events & POLLOUT) {
+ if (pollFds[0].revents & POLLOUT) {
result |= TCL_WRITABLE;
}
- if (pollFds[0].events & POLLERR) {
+ if (pollFds[0].revents & POLLERR) {
result |= TCL_EXCEPTION;
}
if (result) {