Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Aug 2013 12:24:04 -0700
From:      Yuri <yuri@rawbw.com>
To:        Mateusz Guzik <mjguzik@gmail.com>
Cc:        Roman Divacky <rdivacky@freebsd.org>, Alfred Perlstein <bright@mu.org>, current@freebsd.org
Subject:   Re: Linux epoll(7) patch
Message-ID:  <51FFFBD4.7070705@rawbw.com>
In-Reply-To: <20130805153946.GA29300@dft-labs.eu>
References:  <51FF7211.6020909@rawbw.com> <51FFC31D.3080304@mu.org> <20130805152556.GA37810@freebsd.org> <20130805153946.GA29300@dft-labs.eu>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51FFFBD4.7070705>