server: Don't set the idle event when a queue is destroyed, instead return success in WaitForInputIdle on process exit.

This commit is contained in:
Alexandre Julliard 2009-12-16 17:20:46 +01:00
parent ea4babc511
commit d1dc48d8dc
3 changed files with 6 additions and 7 deletions

View File

@ -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;

View File

@ -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 );

View File

@ -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;