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>

@@ -18,11 +18,11 @@
  *
  * CDDL HEADER END
  */
 
 /*
- * Copyright (c) 2013, Joyent, Inc.  All rights reserved.
+ * Copyright 2017 Joyent, Inc.
  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
  */
 
 /*
  * The ipmi driver is an openipmi compatible IPMI driver based on the FreeBSD

@@ -458,13 +458,11 @@
                         revent |= events & (POLLIN | POLLRDNORM);
                 if (dev->ipmi_requests == 0)
                         revent |= POLLERR;
         }
 
-        if (revent == 0) {
-                /* nothing has occurred */
-                if (!anyyet)
+        if ((revent == 0 && !anyyet) || (events & POLLET)) {
                         *phpp = dev->ipmi_pollhead;
         }
 
         *reventsp = revent;
         return (0);