Rebase against 192d335facd5ec6ff2b9acec615efff16385a416.

This commit is contained in:
Elizabeth Figura
2025-10-01 16:58:46 -05:00
parent 78a888cd3d
commit 9c06e8eab3
8 changed files with 30 additions and 222 deletions

View File

@@ -1,4 +1,4 @@
From f4a1348aaf4998e1d5c5a8014d38326982ce5f3d Mon Sep 17 00:00:00 2001
From 9af8e0fc4883258d1aa04179bcabed5057dd8af4 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,10 +27,10 @@ Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/server/thread.c b/server/thread.c
index 05ec6a4ec00..b3b971548bc 100644
index 853aff4cc84..0943266457f 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -422,6 +422,7 @@ static inline void init_thread_structure( struct thread *thread )
@@ -426,6 +426,7 @@ static inline void init_thread_structure( struct thread *thread )
thread->token = NULL;
thread->desc = NULL;
thread->desc_len = 0;
@@ -38,15 +38,15 @@ index 05ec6a4ec00..b3b971548bc 100644
thread->creation_time = current_time;
thread->exit_time = 0;
@@ -642,6 +643,7 @@ static void destroy_thread( struct object *obj )
@@ -654,6 +655,7 @@ static void destroy_thread( struct object *obj )
list_remove( &thread->entry );
cleanup_thread( thread );
release_object( thread->process );
+ if (thread->exit_poll) remove_timeout_user( thread->exit_poll );
if (thread->id) free_ptid( thread->id );
if (thread->token) release_object( thread->token );
if (thread->sync) release_object( thread->sync );
@@ -1549,6 +1551,26 @@ int thread_get_inflight_fd( struct thread *thread, int client )
if (thread->alert_sync) release_object( thread->alert_sync );
@@ -1574,6 +1576,26 @@ int thread_get_inflight_fd( struct thread *thread, int client )
return -1;
}
@@ -73,7 +73,7 @@ index 05ec6a4ec00..b3b971548bc 100644
/* kill a thread on the spot */
void kill_thread( struct thread *thread, int violent_death )
{
@@ -1568,8 +1590,13 @@ void kill_thread( struct thread *thread, int violent_death )
@@ -1593,8 +1615,13 @@ void kill_thread( struct thread *thread, int violent_death )
}
kill_console_processes( thread, 0 );
abandon_mutexes( thread );
@@ -90,10 +90,10 @@ index 05ec6a4ec00..b3b971548bc 100644
remove_process_thread( thread->process, thread );
release_object( thread );
diff --git a/server/thread.h b/server/thread.h
index 58081be7481..d87f84603ef 100644
index 9c552a88ed2..c7e52d86672 100644
--- a/server/thread.h
+++ b/server/thread.h
@@ -95,6 +95,7 @@ struct thread
@@ -98,6 +98,7 @@ struct thread
data_size_t desc_len; /* thread description length in bytes */
WCHAR *desc; /* thread description string */
struct completion_wait *completion_wait; /* completion port wait object the thread is associated with */
@@ -102,5 +102,5 @@ index 58081be7481..d87f84603ef 100644
extern struct thread *current;
--
2.47.2
2.51.0