forked from xuos/xiuos
repair a bug of restart main after ota
This commit is contained in:
parent
1c60efe8a8
commit
ac69e135ca
|
@ -178,10 +178,11 @@ static void RestartApplication(void)
|
|||
while(1)
|
||||
{
|
||||
unsigned long pid = PrivUserTaskSearch();
|
||||
if (pid > 0)
|
||||
if ((pid > 0) && (pid != pthread_self()))
|
||||
{
|
||||
printf("kill usertask pid[%d]\n",pid);
|
||||
PrivTaskDelete(pid, 0);
|
||||
PrivTaskDelay(1000);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue