已开启
bbox fix #1175
wenxingqi创建于 5 天前
bbox fix #1175
已开启
共 1 个文件变更+8-0
| @@ -55,6 +55,7 @@ static TaskBase* g_cur_task; | |||
| 55 | static unsigned int g_cur_pid; | 55 | static unsigned int g_cur_pid; |
| 56 | static unsigned int g_cur_tid; | 56 | static unsigned int g_cur_tid; |
| 57 | static const char* g_cur_signame; | 57 | static const char* g_cur_signame; |
| 58 | +static bool g_secondWait = false; | ||
| 58 | 59 | ||
| 59 | static struct sigaction s_oldSa[SIGSYS + 1]; // SIGSYS = 31 | 60 | static struct sigaction s_oldSa[SIGSYS + 1]; // SIGSYS = 31 |
| 60 | 61 | ||
| @@ -460,6 +461,9 @@ static void HandleChildProcess() | |||
| 460 | } | 461 | } |
| 461 | if (wpid == 0) { | 462 | if (wpid == 0) { |
| 462 | (void)kill(childPid, SIGKILL); | 463 | (void)kill(childPid, SIGKILL); |
| 464 | + if (g_secondWait) { | ||
| 465 | + (void)waitpid(childPid, nullptr, 0); | ||
| 466 | + } | ||
| 463 | } | 467 | } |
| 464 | } | 468 | } |
| 465 | } | 469 | } |
| @@ -516,6 +520,10 @@ static void SignalReg(int signo) | |||
| 516 | 520 | ||
| 517 | __attribute__((constructor)) static void BBoxInit() | 521 | __attribute__((constructor)) static void BBoxInit() |
| 518 | { | 522 | { |
| 523 | + if (strstr(GetCurrentProcessName(), "CameraDaemon")) { | ||
| 524 | + g_secondWait = true; | ||
| 525 | + } | ||
| 526 | + | ||
| 519 | SignalReg(SIGABRT); | 527 | SignalReg(SIGABRT); |
| 520 | SignalReg(SIGBUS); | 528 | SignalReg(SIGBUS); |
| 521 | SignalReg(SIGFPE); | 529 | SignalReg(SIGFPE); |