Added send_thread_signal() function and properly handle errors caused
by the thread having already died when we send it a signal.
Use -1 instead of 0 as invalid Unix pid value.
diff --git a/server/debugger.c b/server/debugger.c
index fdd7461..0e9b875 100644
--- a/server/debugger.c
+++ b/server/debugger.c
@@ -720,11 +720,7 @@
struct thread *thread;
for (thread = process->thread_list; thread; thread = thread->proc_next)
{
- if (thread->unix_pid)
- {
- kill( thread->unix_pid, SIGTRAP );
- break;
- }
+ if (send_thread_signal( thread, SIGTRAP )) break;
}
if (!thread) set_error( STATUS_ACCESS_DENIED );
}