testbot/TestAgentd: Make the socket blocking again even when timing out waiting for the child process.

Francois Gouget fgouget at codeweavers.com
Sun Mar 24 17:35:43 CDT 2013


---

Without this patch a Wait() timeout pretty much guarantees that the 
connection will break on the next RPC.

 testbot/src/testagentd/platform_windows.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/testbot/src/testagentd/platform_windows.c b/testbot/src/testagentd/platform_windows.c
index 10ea55a..92fc9aa 100644
--- a/testbot/src/testagentd/platform_windows.c
+++ b/testbot/src/testagentd/platform_windows.c
@@ -198,7 +198,8 @@ int platform_wait(SOCKET client, uint64_t pid, uint32_t timeout, uint32_t *child
         break;
     case WAIT_TIMEOUT:
         set_status(ST_ERROR, "timed out waiting for the child process");
-        return 0;
+        success = 0;
+        goto cleanup;
     default:
         debug("WaitForMultipleObjects() returned %lu (le=%lu). Giving up!\n", r, GetLastError());
         break;
@@ -207,6 +208,7 @@ int platform_wait(SOCKET client, uint64_t pid, uint32_t timeout, uint32_t *child
     list_remove(&child->entry);
     free(child);
 
+ cleanup:
     /* We must reset WSAEventSelect before we can make
      * the socket blocking again.
      */
-- 
1.7.10.4




More information about the wine-patches mailing list