exit_thread() no longer sends a signal when it's called from a kernel thread - instead,
it will exit directly to have the same behaviour as in user space (where it doesn't return to the caller, since signals are handled before returning to user space). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14309 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1382,7 +1382,13 @@ exit_thread(status_t returnValue)
|
||||
thread->exit.status = returnValue;
|
||||
thread->exit.reason = THREAD_RETURN_EXIT;
|
||||
|
||||
send_signal_etc(thread->id, SIGKILLTHR, B_DO_NOT_RESCHEDULE);
|
||||
// if called from a kernel thread, we don't deliver the signal,
|
||||
// we just exit directly to keep the user space behaviour of
|
||||
// this function
|
||||
if (thread->team != team_get_kernel_team())
|
||||
send_signal_etc(thread->id, SIGKILLTHR, B_DO_NOT_RESCHEDULE);
|
||||
else
|
||||
thread_exit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user