From: Johannes Sixt Date: Sat, 01 Mar 2008 19:24:23 GMT Subject: Re: [PATCH 20/40] Windows: A rudimentary poll() emulation. Message-ID: <200803012024.23286.johannes.sixt@telecom.at> In-Reply-To: <200803011648.38296.robin.rosenberg@dewire.com> On Saturday 01 March 2008 16:48, Robin Rosenberg wrote: > Den Thursday 28 February 2008 21.49.36 skrev Johannes Sixt: > > On Thursday 28 February 2008 10:36, Paolo Bonzini wrote: > > > For the future, would it be better to first use WaitForMultipleObjects, > > > and then use PeekNamedPipe to find which handles have data on it? > > > That's how the mingw port of GNU Smalltalk does it. > > > > I tried but I failed. If you can show me code where > > WaitForMultipleObjects works on handles that MSVCRT.DLL's open() created, > > I'll gladly accept it! > > Have you checked _get_osfhandle? There's a warning though in the > knowledgebase with number 99173, though. There's also another function that > works the other way, _open_osfhandle. Handwaving you are! This stuff is well-known. Show me code. -- Hannes