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>

@@ -19,11 +19,11 @@
  * CDDL HEADER END
  */
 /*
  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2012 Nexenta Systems, Inc.  All rights reserved.
- * Copyright (c) 2015, Joyent, Inc.
+ * Copyright 2017 Joyent, Inc.
  */
 
 /*
  * This file implements the interfaces that the /dev/random
  * driver uses for read(2), write(2) and poll(2) on /dev/random or

@@ -920,11 +920,11 @@
                  */
                 if (rnbyte_cnt >= MINEXTRACTBYTES)
                         *reventsp |= (events & (POLLIN | POLLRDNORM));
         }
 
-        if (*reventsp == 0 && !anyyet)
+        if ((*reventsp == 0 && !anyyet) || (events & POLLET))
                 *phpp = &rnd_pollhead;
 }
 
 /*ARGSUSED*/
 static void