This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to select on a win32 handle?

On Oct  9 12:04, Peter Ekberg wrote:
> On Mon, Oct 09, 2006 at 10:55:18AM +0200, Corinna Vinschen wrote:
> >           To implement a POSIX select function which allows to select on
> > any descriptor one needs to implement it specificially for each known,
> > resp. useful file type.  Naturally this won't work with a generic
> > Windows handle since Cygein doesn't know what it represents.  So Cygwin
> > is unable to provide a matching select function.
> I assumed that cygwin as a last step issued a WaitFor... on the underlying
> win32 handles associated with the fds in its select implementation. Perhaps
> this assumption was wrong? But if not, it would be neat to somehow add an
> extra win32 handle to the array, that would break out of the cygwin select
> when the win32 handle is signaled.

Take a look into winsup/cygwin/  There's no generic way to
select on an arbitrary Windows handle without knowledge about its task.

Selecting manually, for instance by creating a thread which calls WFMO,
is the only useful choice, IMHO.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]