Commit d1dc48d8 authored by Alexandre Julliard's avatar Alexandre Julliard

server: Don't set the idle event when a queue is destroyed, instead return…

server: Don't set the idle event when a queue is destroyed, instead return success in WaitForInputIdle on process exit.
parent ea4babc5
......@@ -3338,7 +3338,7 @@ DWORD WINAPI WaitForInputIdle( HANDLE hProcess, DWORD dwTimeOut )
switch (ret)
{
case WAIT_OBJECT_0:
return WAIT_FAILED;
return 0;
case WAIT_OBJECT_0+2:
process_sent_messages();
break;
......
......@@ -634,6 +634,11 @@ static void process_killed( struct process *process )
if (handles) release_object( handles );
process->winstation = 0;
process->desktop = 0;
if (process->idle_event)
{
release_object( process->idle_event );
process->idle_event = NULL;
}
/* close the console attached to this process, if any */
free_console( process );
......
......@@ -298,12 +298,6 @@ void free_msg_queue( struct thread *thread )
{
release_object( process->queue );
process->queue = NULL;
if (process->idle_event)
{
set_event( process->idle_event );
release_object( process->idle_event );
process->idle_event = NULL;
}
}
release_object( thread->queue );
thread->queue = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment