sched/signal/sig_default.c: Lock the scheduler while while killing the children so that we do not lose priority and let the task group continue to run in an indeterminate state.

This commit is contained in:
Gregory Nutt 2018-08-29 14:55:45 -06:00
parent 94910d2925
commit 1d04ef2f93

View File

@ -169,9 +169,14 @@ static void nxsig_abnormal_termination(int signo)
* this will not kill the currently running task/pthread (this_task). It
* will kill the main thread of the task group if the this_task is a
* pthread.
*
* Lock the scheduler so that there this thread will not lose priority
* until all of its children are dead.
*/
sched_lock();
group_killchildren((FAR struct task_tcb_s *)rtcb);
sched_unlock();
#endif
#ifndef CONFIG_DISABLE_PTHREAD