diff options
author | Tomasz Moń <desowin@gmail.com> | 2019-04-30 15:52:38 +0200 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2019-04-30 15:51:11 +0000 |
commit | b075b8c7f7bc88b3d2811ac46c40bd677c5464ee (patch) | |
tree | 730196fda632f6e9db695ecabec99d9b5be97a16 /wsutil | |
parent | 15fcf3d4ac36dd853c40fd9ae68b4a371a846ca4 (diff) |
wsutil: Fix 30 seconds freeze if process fails to start
In ws_pipe_wait_for_pipe() on Windows, the WaitForMultipleObjects() waits
on the pending pipe connection events and process handle. If the process
handle is signalled, then it means that the process did exit without
connecting to the pipes.
The WaitForMultipleObjects() was not waiting on the process handle and thus
if the process did fail without connecting to pipes the Wireshark gui was
frozen for 30 seconds.
This change fixes the freeze by increasing the number of handles, so
WaitForMultipleObjects() is aware of the process handle.
Change-Id: Id13824a60baf4be7795cbe1d5ed1c7932edbff45
Reviewed-on: https://code.wireshark.org/review/33028
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'wsutil')
-rw-r--r-- | wsutil/ws_pipe.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/wsutil/ws_pipe.c b/wsutil/ws_pipe.c index 0519ddf739..31e6d85ae0 100644 --- a/wsutil/ws_pipe.c +++ b/wsutil/ws_pipe.c @@ -708,6 +708,7 @@ ws_pipe_wait_for_pipe(HANDLE * pipe_handles, int num_pipe_handles, HANDLE pid) } /* Wait for process in case it exits before the pipes have connected */ handles[num_handles] = pid; + num_handles++; dw = WaitForMultipleObjects(num_handles, handles, FALSE, 30000); int handle_idx = dw - WAIT_OBJECT_0; |