[PATCH 1/5] server: Cancel asyncs before closing handles when a process is destroyed.

Zebediah Figura z.figura12 at gmail.com
Mon Mar 22 23:04:26 CDT 2021


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 <z.figura12 at gmail.com>
---
 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 );
-- 
2.30.2




More information about the wine-devel mailing list