From e69d5b9f46c1c1ff37f8376457caa0bcdfd0b9d5 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Mon, 22 Mar 2021 23:04:26 -0500 Subject: [PATCH] server: Cancel asyncs before closing handles when a process is destroyed. test_exit_process_async() essentially validates this. The only reason it currently succeeds (instead of incorrectly returning ERROR_BROKEN_PIPE) is that due to the use of DuplicateHandle() the source handle is never actually closed. Signed-off-by: Zebediah Figura Signed-off-by: Alexandre Julliard --- server/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/process.c b/server/process.c index f65d7abe2af..571a80f0dc6 100644 --- a/server/process.c +++ b/server/process.c @@ -842,8 +842,8 @@ static void process_killed( struct process *process ) if (!process->is_system) close_process_desktop( process ); process->winstation = 0; process->desktop = 0; - close_process_handles( process ); cancel_process_asyncs( process ); + close_process_handles( process ); if (process->idle_event) release_object( process->idle_event ); process->idle_event = NULL; assert( !process->console );