fix: add workspace data check

Signed-off-by: whoselittlelion <humin16@huawei.com>
This commit is contained in:
whoselittlelion 2024-01-31 15:32:52 +08:00
parent a6d9715e35
commit 6d960024f8

View File

@ -36,6 +36,10 @@ static pid_t HandleSigChild(const struct signalfd_siginfo *siginfo)
}
Service* service = GetServiceByPid(sigPID);
const char *serviceName = (service == NULL) ? "Unknown" : service->name;
if (strcmp(serviceName, "param_watcher") == 0) {
int ret = system("/system/bin/tar -zcf /data/log/startup/parameter.tar.gz /dev/__parameters__/*");
INIT_LOGI("parameter compress dump ret is %d", ret);
}
// check child process exit status
if (WIFSIGNALED(procStat)) {