Rebase against ce275f38a02dd5f809eea45ff3fa02f645b56a7c

This commit is contained in:
Alistair Leslie-Hughes
2019-11-27 11:11:51 +11:00
parent f4987b47e3
commit 3ba119e67c
5 changed files with 65 additions and 62 deletions

View File

@@ -1,4 +1,4 @@
From dec47516b5df791ff46909db03fe9752385a97d7 Mon Sep 17 00:00:00 2001
From a2401a21b78201f2310d571f8d66ac574dd0d830 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 12 Nov 2018 18:10:32 +0200
Subject: [PATCH] server: Do not signal violently terminated threads until they
@@ -27,18 +27,18 @@ Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/server/thread.c b/server/thread.c
index b1d324f7d..044d73ca9 100644
index 1c0fbd4179b..f8962221d9a 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -203,6 +203,7 @@ static inline void init_thread_structure( struct thread *thread )
thread->suspend = 0;
thread->desktop_users = 0;
thread->token = NULL;
thread->desc = NULL;
thread->desc_len = 0;
+ thread->exit_poll = NULL;
thread->creation_time = current_time;
thread->exit_time = 0;
@@ -358,6 +359,7 @@ static void destroy_thread( struct object *obj )
@@ -361,6 +362,7 @@ static void destroy_thread( struct object *obj )
list_remove( &thread->entry );
cleanup_thread( thread );
release_object( thread->process );
@@ -46,7 +46,7 @@ index b1d324f7d..044d73ca9 100644
if (thread->id) free_ptid( thread->id );
if (thread->token) release_object( thread->token );
}
@@ -382,7 +384,7 @@ static struct object_type *thread_get_type( struct object *obj )
@@ -385,7 +387,7 @@ static struct object_type *thread_get_type( struct object *obj )
static int thread_signaled( struct object *obj, struct wait_queue_entry *entry )
{
struct thread *mythread = (struct thread *)obj;
@@ -55,7 +55,7 @@ index b1d324f7d..044d73ca9 100644
}
static unsigned int thread_map_access( struct object *obj, unsigned int access )
@@ -1143,6 +1145,26 @@ int thread_get_inflight_fd( struct thread *thread, int client )
@@ -1171,6 +1173,26 @@ int thread_get_inflight_fd( struct thread *thread, int client )
return -1;
}
@@ -82,7 +82,7 @@ index b1d324f7d..044d73ca9 100644
/* kill a thread on the spot */
void kill_thread( struct thread *thread, int violent_death )
{
@@ -1163,8 +1185,12 @@ void kill_thread( struct thread *thread, int violent_death )
@@ -1191,8 +1213,12 @@ void kill_thread( struct thread *thread, int violent_death )
kill_console_processes( thread, 0 );
debug_exit_thread( thread );
abandon_mutexes( thread );
@@ -98,17 +98,17 @@ index b1d324f7d..044d73ca9 100644
remove_process_thread( thread->process, thread );
release_object( thread );
diff --git a/server/thread.h b/server/thread.h
index bafc08ed4..4e7f794c0 100644
index 7957557b6cc..880419c5924 100644
--- a/server/thread.h
+++ b/server/thread.h
@@ -90,6 +90,7 @@ struct thread
timeout_t exit_time; /* Thread exit time */
struct token *token; /* security token associated with this thread */
struct list kernel_object; /* list of kernel object pointers */
data_size_t desc_len; /* thread description length in bytes */
WCHAR *desc; /* thread description string */
+ struct timeout_user *exit_poll; /* poll if the thread/process has exited already */
};
struct thread_snapshot
--
2.21.0
2.24.0