Jacek Caban : server: Cancel process asyncs on process termination.

Alexandre Julliard julliard at winehq.org
Thu Dec 1 15:37:44 CST 2016


Module: wine
Branch: master
Commit: 6ffe08459fe52e959e30b8a6a3c817611dfcec5f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6ffe08459fe52e959e30b8a6a3c817611dfcec5f

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Dec  1 12:10:47 2016 +0100

server: Cancel process asyncs on process termination.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 server/async.c   | 5 +++++
 server/file.h    | 1 +
 server/process.c | 1 +
 3 files changed, 7 insertions(+)

diff --git a/server/async.c b/server/async.c
index 5acd1e7..70ebf95 100644
--- a/server/async.c
+++ b/server/async.c
@@ -369,6 +369,11 @@ restart:
     return woken;
 }
 
+void cancel_process_asyncs( struct process *process )
+{
+    cancel_async( process, NULL, NULL, 0 );
+}
+
 /* wake up async operations on the queue */
 void async_wake_up( struct async_queue *queue, unsigned int status )
 {
diff --git a/server/file.h b/server/file.h
index 19e638e..fb2e905 100644
--- a/server/file.h
+++ b/server/file.h
@@ -175,6 +175,7 @@ extern void async_terminate( struct async *async, unsigned int status );
 extern void async_wake_up( struct async_queue *queue, unsigned int status );
 extern struct completion *fd_get_completion( struct fd *fd, apc_param_t *p_key );
 extern void fd_copy_completion( struct fd *src, struct fd *dst );
+extern void cancel_process_asyncs( struct process *process );
 
 /* access rights that require Unix read permission */
 #define FILE_UNIX_READ_ACCESS (FILE_READ_DATA|FILE_READ_ATTRIBUTES|FILE_READ_EA)
diff --git a/server/process.c b/server/process.c
index cca18e9..e9e2f21 100644
--- a/server/process.c
+++ b/server/process.c
@@ -840,6 +840,7 @@ static void process_killed( struct process *process )
     process->winstation = 0;
     process->desktop = 0;
     close_process_handles( process );
+    cancel_process_asyncs( process );
     if (process->idle_event)
     {
         release_object( process->idle_event );




More information about the wine-cvs mailing list