Re: how to to put windows HANDLE into a GPollFD
- From: Tor Lillqvist <tml iki fi>
- To: puzzlecracker <vehomzzz yahoo com>
- Cc: gtk-list gnome org
- Subject: Re: how to to put windows HANDLE into a GPollFD
- Date: Tue, 11 Aug 2009 17:19:10 +0300
> 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]