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:
parent
ea4babc511
commit
d1dc48d8dc
|
@ -3338,7 +3338,7 @@ DWORD WINAPI WaitForInputIdle( HANDLE hProcess, DWORD dwTimeOut )
|
||||||
switch (ret)
|
switch (ret)
|
||||||
{
|
{
|
||||||
case WAIT_OBJECT_0:
|
case WAIT_OBJECT_0:
|
||||||
return WAIT_FAILED;
|
return 0;
|
||||||
case WAIT_OBJECT_0+2:
|
case WAIT_OBJECT_0+2:
|
||||||
process_sent_messages();
|
process_sent_messages();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -634,6 +634,11 @@ static void process_killed( struct process *process )
|
||||||
if (handles) release_object( handles );
|
if (handles) release_object( handles );
|
||||||
process->winstation = 0;
|
process->winstation = 0;
|
||||||
process->desktop = 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 */
|
/* close the console attached to this process, if any */
|
||||||
free_console( process );
|
free_console( process );
|
||||||
|
|
|
@ -298,12 +298,6 @@ void free_msg_queue( struct thread *thread )
|
||||||
{
|
{
|
||||||
release_object( process->queue );
|
release_object( process->queue );
|
||||||
process->queue = NULL;
|
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 );
|
release_object( thread->queue );
|
||||||
thread->queue = NULL;
|
thread->queue = NULL;
|
||||||
|
|
Loading…
Reference in New Issue