[2/2] server: Wake up APC if we fail to allocate a handle in target process.

Sebastian Lackner sebastian at fds-team.de
Wed Nov 4 22:41:58 CST 2015


Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
---

Unrelated to the deadlock, but fixes another issue with APC handling.
The ntdll/server.c code will only queue a new APC if we at least wake it up.

 server/thread.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/server/thread.c b/server/thread.c
index d65ea89..bad2231 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -1500,10 +1500,10 @@ DECL_HANDLER(select)
             /* Optimization: ignore APC_NONE calls, they are only used to
              * wake up a thread, but since we got here the thread woke up already.
              */
-            if (apc->call.type != APC_NONE)
+            if (apc->call.type != APC_NONE &&
+                (reply->apc_handle = alloc_handle( current->process, apc, SYNCHRONIZE, 0 )))
             {
-                if ((reply->apc_handle = alloc_handle( current->process, apc, SYNCHRONIZE, 0 )))
-                    reply->call = apc->call;
+                reply->call = apc->call;
                 release_object( apc );
                 break;
             }
-- 
2.6.2



More information about the wine-patches mailing list