Zebediah Figura : server: Cancel asyncs before closing handles when a process is destroyed.

Alexandre Julliard julliard at winehq.org
Tue Mar 23 16:54:31 CDT 2021


Module: wine
Branch: master
Commit: e69d5b9f46c1c1ff37f8376457caa0bcdfd0b9d5
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=e69d5b9f46c1c1ff37f8376457caa0bcdfd0b9d5

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Mon Mar 22 23:04:26 2021 -0500

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 <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

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




More information about the wine-cvs mailing list