- ctrl-c enabling flag is now inherited
- fixed console-related fields in RTL_USER_PROCESS_PARAMETERS
- various clean-up in kernel32.SetConsoleCtrlHandler
- only send a console event once to a process and not to all the
process' threads
diff --git a/server/console.c b/server/console.c
index b9da5a6..9312f42 100644
--- a/server/console.c
+++ b/server/console.c
@@ -386,7 +386,8 @@
return console;
}
-struct console_signal_info {
+struct console_signal_info
+{
struct console_input *console;
process_id_t group;
int signal;
@@ -399,13 +400,11 @@
if (process->console == csi->console && process->running_threads &&
(!csi->group || process->group_id == csi->group))
{
- struct thread *thread = process->thread_list;
-
- while (thread)
+ /* find a suitable thread to signal */
+ struct thread *thread;
+ for (thread = process->thread_list; thread; thread = thread->proc_next)
{
- struct thread *next = thread->proc_next;
- send_thread_signal( thread, csi->signal );
- thread = next;
+ if (send_thread_signal( thread, csi->signal )) break;
}
}
return FALSE;