Blocking code for Windows Pipes.

Bryan Kadzban bryan
Sat Aug 26 20:30:36 PDT 2006

Jouni Malinen wrote:
> If you want to use WaitForSingleObject to wait for events, you would
> at least need to change wpa_ctrl_get_fd() to return the file handle.
> Though, I'm not sure whether that would work without issues with
> named pipes.

I am fairly sure it will not work properly -- or if it does, I am fairly
sure it's not *documented* to work properly (which means n future
versions of Windows, the behavior could change).  I certainly wouldn't
use it myself.

I believe overlapped I/O is the only documented way to do that kind of
thing.  On the other hand, if the code is just going to wait until input
is available *anyway*, then why not do the ReadFile synchronously?  (Not
in ctrl_iface_named_pipe.c -- in the program being written here.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 258 bytes
Desc: OpenPGP digital signature
Url : 

More information about the Hostap mailing list