mirror of
https://gitee.com/openharmony/startup_appspawn
synced 2024-11-27 09:11:04 +00:00
!405 Fix: 修改appspawn 冷启动
Merge pull request !405 from cheng_jinsong/appspawn_0909
This commit is contained in:
commit
df31893987
@ -42,12 +42,12 @@ int main(int argc, char *const argv[])
|
||||
return -1;
|
||||
}
|
||||
argvSize = end - start;
|
||||
}
|
||||
|
||||
int isRet = memset_s(argv[0], argvSize, 0, (size_t)argvSize) != EOK;
|
||||
APPSPAWN_CHECK(!isRet, return -EINVAL, "Failed to memset argv[0]");
|
||||
isRet = strncpy_s(argv[0], argvSize, APPSPAWN_SERVER_NAME, strlen(APPSPAWN_SERVER_NAME)) != EOK;
|
||||
APPSPAWN_CHECK(!isRet, return -EINVAL, "strncpy_s appspawn server name error: %d", errno);
|
||||
int isRet = memset_s(argv[0], argvSize, 0, (size_t)argvSize) != EOK;
|
||||
APPSPAWN_CHECK(!isRet, return -EINVAL, "Failed to memset argv[0]");
|
||||
isRet = strncpy_s(argv[0], argvSize, APPSPAWN_SERVER_NAME, strlen(APPSPAWN_SERVER_NAME)) != EOK;
|
||||
APPSPAWN_CHECK(!isRet, return -EINVAL, "strncpy_s appspawn server name error: %d", errno);
|
||||
}
|
||||
|
||||
APPSPAWN_LOGI("AppSpawnCreateContent argc %d mode %d %u", argc, mode, argvSize);
|
||||
AppSpawnContent *content = AppSpawnCreateContent(APPSPAWN_SOCKET_NAME, argv[0], argvSize, mode);
|
||||
|
Loading…
Reference in New Issue
Block a user