mirror of
https://gitee.com/openharmony/startup_appspawn
synced 2024-11-23 07:00:17 +00:00
修复一些问题
1.拼写问题 2.文件权限不对的问题 3.表达式的简化 Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
This commit is contained in:
parent
becc2e5712
commit
96e000b450
0
README_zh.md
Executable file → Normal file
0
README_zh.md
Executable file → Normal file
0
appspawn.cfg
Executable file → Normal file
0
appspawn.cfg
Executable file → Normal file
0
interfaces/innerkits/BUILD.gn
Executable file → Normal file
0
interfaces/innerkits/BUILD.gn
Executable file → Normal file
@ -29,7 +29,7 @@ public:
|
||||
explicit ClientSocket(const std::string &client);
|
||||
|
||||
/**
|
||||
* Destructor used to destory a ClientSocket
|
||||
* Destructor used to destroy a ClientSocket
|
||||
*/
|
||||
virtual ~ClientSocket() = default;
|
||||
|
||||
|
@ -298,7 +298,7 @@ int AppSpawnServer::DoColdStartApp(ClientSocket::AppProperty *appProperty, int f
|
||||
extractedCmds.push_back(nullptr);
|
||||
APPSPAWN_LOGI("DoColdStartApp extractedCmds %d", extractedCmds.size());
|
||||
int ret = execv(extractedCmds[0], extractedCmds.data());
|
||||
if (ret != 0) {
|
||||
if (ret) {
|
||||
HiLog::Error(LABEL, "Failed to execv, errno = %{public}d", errno);
|
||||
NotifyResToParentProc(fd, -1);
|
||||
}
|
||||
@ -386,7 +386,7 @@ bool AppSpawnServer::ServerMain(char *longProcName, int64_t longProcNameLen)
|
||||
ClientSocket::AppProperty *appProperty = msg->GetMsg();
|
||||
pid_t pid = 0;
|
||||
int ret = StartApp(longProcName, longProcNameLen, appProperty, connectFd, pid);
|
||||
if (ret != 0) {
|
||||
if (ret) {
|
||||
msg->Response(ret);
|
||||
} else {
|
||||
msg->Response(pid);
|
||||
@ -723,7 +723,7 @@ int32_t AppSpawnServer::DoSandboxRootFolderCreateAdapt(std::string sandboxPackag
|
||||
}
|
||||
|
||||
// bind mount "/" to /mnt/sandbox/<packageName> path
|
||||
// rootfs: to do more resouces bind mount here to get more strict resources constraints
|
||||
// rootfs: to do more resources bind mount here to get more strict resources constraints
|
||||
rc = mount("/", sandboxPackagePath.c_str(), NULL, MS_BIND | MS_REC, NULL);
|
||||
if (rc) {
|
||||
HiLog::Error(LABEL, "mount bind / failed");
|
||||
@ -867,7 +867,7 @@ void AppSpawnServer::SetAppAccessToken(const ClientSocket::AppProperty *appPrope
|
||||
#ifdef WITH_SELINUX
|
||||
HapContext hapContext;
|
||||
ret = hapContext.HapDomainSetcontext(appProperty->apl, appProperty->processName);
|
||||
if (ret != 0) {
|
||||
if (ret) {
|
||||
HiLog::Error(LABEL, "AppSpawnServer::Failed to hap domain set context, errno = %{public}d %{public}s",
|
||||
errno, appProperty->apl);
|
||||
} else {
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
AppSpawnMsgPeer(const std::shared_ptr<ServerSocket> &socket, int connectFd);
|
||||
|
||||
/**
|
||||
* Destructor used to destory a AppSpawnMsgPeer
|
||||
* Destructor used to destroy a AppSpawnMsgPeer
|
||||
*/
|
||||
~AppSpawnMsgPeer();
|
||||
|
||||
|
@ -39,7 +39,7 @@ public:
|
||||
explicit AppSpawnServer(const std::string &socketName);
|
||||
|
||||
/**
|
||||
* Destructor used to destory a AppSpawnServer
|
||||
* Destructor used to destroy a AppSpawnServer
|
||||
*/
|
||||
~AppSpawnServer() = default;
|
||||
|
||||
@ -93,7 +93,7 @@ private:
|
||||
void ConnectionPeer();
|
||||
|
||||
/**
|
||||
* Sets a name for an applicaiton process.
|
||||
* Sets a name for an application process.
|
||||
*
|
||||
* @param longProcName Indicates the length of long process name.
|
||||
* @param longProcNameLen Indicates the long process name.
|
||||
|
@ -34,7 +34,7 @@ public:
|
||||
explicit ServerSocket(const std::string &server);
|
||||
|
||||
/**
|
||||
* Destructor used to destory a ServerSocket
|
||||
* Destructor used to destroy a ServerSocket
|
||||
*/
|
||||
virtual ~ServerSocket();
|
||||
|
||||
|
0
src/socket/appspawn_socket.cpp
Executable file → Normal file
0
src/socket/appspawn_socket.cpp
Executable file → Normal file
0
test/unittest/app_spawn_server_test/BUILD.gn
Executable file → Normal file
0
test/unittest/app_spawn_server_test/BUILD.gn
Executable file → Normal file
Loading…
Reference in New Issue
Block a user