mirror of
https://gitee.com/openharmony/startup_appspawn
synced 2024-11-23 15:10:44 +00:00
support setting ASAN_OPTIONS for ColdStartApp
Signed-off-by: nianyuu <zhouwenqiang12@huawei.com>
This commit is contained in:
parent
f46ef6112b
commit
6141dbbe85
@ -89,11 +89,6 @@ int DoStartApp(struct AppSpawnContent *content, AppSpawnClient *client, char *lo
|
||||
content->handleInternetPermission(client);
|
||||
}
|
||||
|
||||
if (content->setEnvInfo) {
|
||||
ret = content->setEnvInfo(content, client);
|
||||
APPSPAWN_CHECK(ret == 0, NotifyResToParent(content, client, ret); return ret, "Failed to setEnvInfo");
|
||||
}
|
||||
|
||||
if (content->setAppSandbox) {
|
||||
ret = content->setAppSandbox(content, client);
|
||||
APPSPAWN_CHECK(ret == 0, NotifyResToParent(content, client, ret); return ret, "Failed to set app sandbox");
|
||||
@ -155,8 +150,7 @@ static int AppSpawnChild(void *arg)
|
||||
|
||||
if (content->setProcessName) {
|
||||
ret = content->setProcessName(content, client, content->longProcName, content->longProcNameLen);
|
||||
APPSPAWN_CHECK(ret == 0, NotifyResToParent(content, client, ret);
|
||||
return ret, "Failed to set setProcessName");
|
||||
APPSPAWN_CHECK(ret == 0, NotifyResToParent(content, client, ret); return ret, "Failed to set setProcessName");
|
||||
}
|
||||
|
||||
#ifdef OHOS_DEBUG
|
||||
@ -170,10 +164,12 @@ static int AppSpawnChild(void *arg)
|
||||
|
||||
if (content->setAppAccessToken != NULL) {
|
||||
ret = content->setAppAccessToken(content, client);
|
||||
if (ret != 0) {
|
||||
APPSPAWN_LOGE("AppSpawnChild, set app token id failed");
|
||||
return -1;
|
||||
}
|
||||
APPSPAWN_CHECK(ret == 0, return -1, "AppSpawnChild, set app token id failed");
|
||||
}
|
||||
|
||||
if (content->setEnvInfo) {
|
||||
ret = content->setEnvInfo(content, client);
|
||||
APPSPAWN_CHECK(ret == 0, NotifyResToParent(content, client, ret); return ret, "Failed to setEnvInfo");
|
||||
}
|
||||
|
||||
if ((content->getWrapBundleNameValue != NULL && content->getWrapBundleNameValue(content, client) == 0) ||
|
||||
|
@ -335,6 +335,9 @@ static int SpawnInitSpawningEnv(AppSpawnMgr *content, AppSpawningCtx *property)
|
||||
|
||||
ret = SetAppAccessToken(content, property);
|
||||
APPSPAWN_CHECK_ONLY_EXPER(ret == 0, return ret);
|
||||
|
||||
ret = SetEnvInfo(content, property);
|
||||
APPSPAWN_CHECK_ONLY_EXPER(ret == 0, return ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -378,9 +381,6 @@ static int SpawnSetProperties(AppSpawnMgr *content, AppSpawningCtx *property)
|
||||
ret = SetSelinuxCon(content, property) == -1;
|
||||
APPSPAWN_CHECK_ONLY_EXPER(ret == 0, return ret);
|
||||
|
||||
ret = SetEnvInfo(content, property);
|
||||
APPSPAWN_CHECK_ONLY_EXPER(ret == 0, return ret);
|
||||
|
||||
ret = WaitForDebugger(property);
|
||||
APPSPAWN_CHECK_ONLY_EXPER(ret == 0, return ret);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user