* The kernel now remembers the signal that killed a thread (if it was killed).
* As suggested by Korli, the signal is now encoded in the "reason" field of wait_for_child(). * waitpid() now sets the status passed in so that the signal can be read out (but it still doesn't do it's full job). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17338 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -207,6 +207,7 @@ create_thread_struct(const char *name, thread_id threadID)
|
||||
thread->last_time = 0;
|
||||
thread->exit.status = 0;
|
||||
thread->exit.reason = 0;
|
||||
thread->exit.signal = 0;
|
||||
list_init(&thread->exit.waiters);
|
||||
|
||||
sprintf(temp, "thread_0x%lx_retcode_sem", thread->id);
|
||||
@@ -957,6 +958,7 @@ thread_exit(void)
|
||||
death->thread = thread->id;
|
||||
death->status = thread->exit.status;
|
||||
death->reason = thread->exit.reason;
|
||||
death->signal = thread->exit.signal;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1038,6 +1040,7 @@ thread_exit(void)
|
||||
while ((death = list_get_next_item(&thread->exit.waiters, death)) != NULL) {
|
||||
death->status = thread->exit.status;
|
||||
death->reason = thread->exit.reason;
|
||||
death->signal = thread->exit.signal;
|
||||
}
|
||||
|
||||
RELEASE_THREAD_LOCK();
|
||||
|
||||
Reference in New Issue
Block a user