Re: how to to put windows HANDLE into a GPollFD



> I am trying to use windows anonymous read pipe with gtk and need to put HANLE
> into GPollFD. How do I do that?

You can use _get_osfhandle() (declared in <io.h>) to get the Windows
HANDLE for a C library file descriptor (for instance an anonymous pipe
end). But that doesn't help much, as anonymous pipe handles, or file
handles in general, are not waitable objects, so it doesn't work to
watch such handles with GLib functionality. (Yeah, sorry, I gave
misleading advice in another thread about that.) That's why GLib uses
a separate thread per file descriptor being watched.

--tml


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]