Do not pass pipe handle to WaitForMultipleObjects
authorTomasz Moń <desowin@gmail.com>
Thu, 16 Aug 2018 19:06:41 +0000 (21:06 +0200)
committerRoland Knall <rknall@gmail.com>
Thu, 16 Aug 2018 20:25:35 +0000 (20:25 +0000)
commit9ecc7906ef6a7c32217a2a8780d5374b0b5398de
treee0cacab433edaa66bcac60d0c5dcf7230b57a418
parent00011526161779a6102c9feca4b4bc83d4829b33
Do not pass pipe handle to WaitForMultipleObjects

The Remarks section in WaitForMultipleObjects describes what kind of
handles the function can wait for. Pipe handles are not listed there.

The problem was introduced in c18459e66e8e71a8765bb9b8e2b3d2ba61855a3f

While it might be possible to setup overlapped reads on the pipe handles
and then wait on overlapped events, it would result in quite complex
code. As a tradeoff, simply keep peeking at the pipes every 100 ms.

Change-Id: I6ba4f4bf4c1d2af856027cca36ffd6d4f7f49f36
Bug: 14657
Reviewed-on: https://code.wireshark.org/review/29163
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
wsutil/ws_pipe.c