1 个文件变更+8-0
@@ -55,6 +55,7 @@ static TaskBase* g_cur_task;
55static unsigned int g_cur_pid;55static unsigned int g_cur_pid;
56static unsigned int g_cur_tid;56static unsigned int g_cur_tid;
57static const char* g_cur_signame;57static const char* g_cur_signame;
58+static bool g_secondWait = false;
58 59 
59static struct sigaction s_oldSa[SIGSYS + 1]; // SIGSYS = 3160static 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);