See the attached test (both files needed). Okay, the problem isn't that the handle doesn't get updated, but merely that vec_ri and vec_wi in contain the handle that *was* associated with the fd. After the handle is updated, vec_ri/vec_wi still contain that old handle, but select_modify doesn't remove it because the handle that must be removed is lost, overwritten when updating.
- Bert > -----Oorspronkelijk bericht----- > Van: Marc Lehmann [mailto:[email protected]] > Verzonden: maandag 24 januari 2011 22:24 > Aan: Bert Belder > CC: [email protected] > Onderwerp: Re: Problem with select on windows > > On Mon, Jan 24, 2011 at 10:04:42PM +0100, Bert Belder > <[email protected]> wrote: > > There is a problem with libev/select on windows. When a socket that > is being > > observed with an ev_io watcher is closed, and the same fd gets re- > used for > > another socket in the same tick (so before control to is returned to > libev), > > the windows handle that is cached in ANFD->handle is not updated. > > Actually, according to the code, the cached handle gets updated on > every > start of an I/O watcher that has it's fd updated. > > Are you sure you stop/set/start the watcher? (See "The special problem > of > disappearing file descriptors"). > > If you do, can you make a small testcase the illustrates the problem? I > can't see how it can not update the cached fd (there might be a problem > with updating it, but that doesn't seem to be what you see). > > > Is there a better solution to this problem? > > And if not, any chance that this patch could be landed? > > It should just work, and if it doesn't, it needs to be made to work. > > -- > The choice of a Deliantra, the free code+content > MORPG > -----==- _GNU_ http://www.deliantra.net > ----==-- _ generation > ---==---(_)__ __ ____ __ Marc Lehmann > --==---/ / _ \/ // /\ \/ / [email protected] > -=====/_/_//_/\_,_/ /_/\_\
config.h
Description: Binary data
test.c
Description: Binary data
_______________________________________________ libev mailing list [email protected] http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev
