Print this page
8634 epoll fails to wake on certain edge-triggered conditions
8635 epoll should not emit POLLNVAL
8636 recursive epoll should emit EPOLLRDNORM
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
@@ -20,10 +20,11 @@
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ * Copyright 2017 Joyent, Inc.
*/
/*
* srn Provide apm-like interfaces to Xorg
@@ -261,14 +262,15 @@
clone = SRN_MINOR_TO_CLONE(getminor(dev));
if ((events & (POLLIN | POLLRDNORM)) && srn_poll_cnt[clone]) {
*reventsp |= (POLLIN | POLLRDNORM);
} else {
*reventsp = 0;
- if (!anyyet) {
+ }
+
+ if ((*reventsp == 0 && !anyyet) || (events & POLLET)) {
*phpp = &srn_pollhead[clone];
}
- }
return (0);
}
/*ARGSUSED*/
static int