Small cleanup/improvement to epoll creation

Alan Bateman Alan.Bateman at oracle.com
Tue Apr 7 19:27:23 UTC 2020


On 06/04/2020 17:50, David Lloyd wrote:
> Since glibc 2.9 (released at the end of 2008), there has been an
> improved function for EPoll creation.  I would suggest the following
> cleanup, which uses the "epoll_create1" function to set the FD to
> close-on-exec (which is generally just good practice AFAICT, even if
> it's not exactly one that has been universally adopted by OpenJDK thus
> far).
This looks okay, just need to update the exception message too. You are 
right that we don't use CLOEXEC consistently. The JDK gets away due to 
heroics in Process code to ensure that file descriptors are closed.

-Alan


More information about the nio-dev mailing list