Author: jimtabor
Date: Sat Oct 25 22:06:13 2014
New Revision: 64999

URL: http://svn.reactos.org/svn/reactos?rev=64999&view=rev
Log:
[NtUser]
- Do not block sending messages from a dying thread. See CORE-7447.

Modified:
    trunk/reactos/win32ss/user/ntuser/msgqueue.c

Modified: trunk/reactos/win32ss/user/ntuser/msgqueue.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/msgqueue.c?rev=64999&r1=64998&r2=64999&view=diff
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/msgqueue.c        [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/msgqueue.c        [iso-8859-1] Sat Oct 25 
22:06:13 2014
@@ -973,8 +973,15 @@
    /* Don't send from or to a dying thread */
     if (pti->TIF_flags & TIF_INCLEANUP || ptirec->TIF_flags & TIF_INCLEANUP)
     {
+        // Unless we are dying and need to tell our parents.
+        if (pti->TIF_flags & TIF_INCLEANUP && !(ptirec->TIF_flags & 
TIF_INCLEANUP))
+        {
+           // Parent notify is the big one. Fire and forget!
+           TRACE("Send message from dying thread %d\n",Msg);
+           co_MsqSendMessageAsync(ptirec, Wnd, Msg, wParam, lParam, NULL, 0, 
FALSE, HookMessage);
+        }
         if (uResult) *uResult = -1;
-        ERR("MsqSM: Current pti %lu or Rec pti %lu\n", pti->TIF_flags & 
TIF_INCLEANUP, ptirec->TIF_flags & TIF_INCLEANUP);
+        TRACE("MsqSM: Msg %d Current pti %lu or Rec pti %lu\n", Msg, 
pti->TIF_flags & TIF_INCLEANUP, ptirec->TIF_flags & TIF_INCLEANUP);
         return STATUS_UNSUCCESSFUL;
     }
 


Reply via email to