Wireshark-commits: [Wireshark-commits] master c18459e: Fix extcap initialization deadlock
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=c18459e66e8e71a8765bb9b8e2b3d2ba61855a3f
Submitter: "Roland Knall <rknall@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark
Commits:
c18459e by Tomasz Moń (desowin@xxxxxxxxx):
Fix extcap initialization deadlock
On Windows the code calling extcap worked as follows:
1. Create stdout and stderr pipes with default buffer size
2. Execute extcap redirecting output to the pipes
3. Wait for extcap process to exit
4. Read the data from stdout pipe
This resulted in deadlock when the extcap wrote more data than the pipe
could buffer. This was especially seen with USBPcap as it is quite
normal to have plenty of USB devices connected.
Fix the issue by contantly reading the stdout data and storing it in
GString. To prevent similar deadlock on the stderr, the stderr data is
being constantly monitored as well (and discarded).
Change-Id: I0f93e6d79617cef0e828aef2b96fad2757227923
Bug: 14657
Reviewed-on: https://code.wireshark.org/review/29159
Petri-Dish: Pascal Quantin <pascal.quantin@xxxxxxxxx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@xxxxxxxxx>
Actions performed:
from 43a5f0a ntp: fix mixed indentation.
add c18459e Fix extcap initialization deadlock
Summary of changes:
wsutil/ws_pipe.c | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 72 insertions(+), 6 deletions(-)