Re: Linux epoll(7) patch

From: Yuri <yuri_at_rawbw.com>
Date: Mon, 05 Aug 2013 12:24:04 -0700
On 08/05/2013 08:39, Mateusz Guzik wrote:
> What happens to fd after the fork? Is it closed or simply remains
> non-functional?
>
> If the former, I suggest the patch is altered to leave fd with badfdops
> in place so that epoll users get less surprised.

I will try to alter it this way. However, there is no easy way of 
testing such case, apart from compiling specially crafted linux program.
Also forking after poll is a marginal case. Doubt it ever matters in 
practice.

I found two more problems with the patch: epoll_wait treats timeout as 
if it was in microseconds, when it is in milliseconds. Also epoll_wait 
doesn't check for the special case of timeout=-1. I corrected both 
issues. Will do additional testing, and will submit PR with an updated 
patch when done.

Yuri
Received on Mon Aug 05 2013 - 17:24:11 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:40 UTC