uti: Call terminate only when exit_group is called
Tracer tells McKernel side to call do_exit() in WIFSIGNALED case. Change-Id: If85c6cbb4856036b406b11335f1384e57f26292d
This commit is contained in:
@@ -3027,8 +3027,9 @@ create_tracer()
|
|||||||
term_param[1] = uti_desc->tid;
|
term_param[1] = uti_desc->tid;
|
||||||
term_param[3] = uti_desc->key;
|
term_param[3] = uti_desc->key;
|
||||||
code = st;
|
code = st;
|
||||||
if (exited == 2 || // exit_group
|
/* exit_group case. Note that killing-signal kills mcexec and tracer in terminate(),
|
||||||
WIFSIGNALED(st)) {
|
so this won't be reached. */
|
||||||
|
if (exited == 2) {
|
||||||
code |= 0x0000000100000000;
|
code |= 0x0000000100000000;
|
||||||
}
|
}
|
||||||
term_param[2] = code;
|
term_param[2] = code;
|
||||||
|
|||||||
@@ -9123,13 +9123,13 @@ util_thread(struct uti_attr *arg)
|
|||||||
kfree(uti_clv);
|
kfree(uti_clv);
|
||||||
|
|
||||||
if (rc >= 0) {
|
if (rc >= 0) {
|
||||||
if (rc & 0x10000007f) { // exit_group || signal
|
if (rc & 0x100000000) { /* exit_group */
|
||||||
dkprintf("%s: exit_group || signal\n", __FUNCTION__);
|
dkprintf("%s: exit_group, tid=%d,rc=%lx\n", __FUNCTION__, thread->tid, rc);
|
||||||
thread->proc->nohost = 1;
|
thread->proc->nohost = 1;
|
||||||
terminate((rc >> 8) & 255, rc & 255);
|
terminate((rc >> 8) & 255, rc & 255);
|
||||||
}
|
} else {
|
||||||
else {
|
/* tracer has detected exit or killed by signal */
|
||||||
dkprintf("%s: !exit_group && !signal\n", __FUNCTION__);
|
dkprintf("%s: exit, pid=%d,tid=%d,rc=%lx\n", __FUNCTION__, thread->proc->pid, thread->tid, rc);
|
||||||
request.number = __NR_sched_setaffinity;
|
request.number = __NR_sched_setaffinity;
|
||||||
request.args[0] = 1;
|
request.args[0] = 1;
|
||||||
request.args[1] = free_address;
|
request.args[1] = free_address;
|
||||||
|
|||||||
Reference in New Issue
Block a user