mirror of
https://gitee.com/openharmony/startup_appspawn
synced 2024-11-23 07:00:17 +00:00
!43 FIx library loader micro
Merge pull request !43 from guozejun/cherry-pick-1632720812
This commit is contained in:
commit
48047dbe8c
@ -143,12 +143,7 @@ private:
|
||||
*/
|
||||
bool CheckAppProperty(const ClientSocket::AppProperty *appProperty);
|
||||
|
||||
#ifdef ACEABILITY_LIBRARY_LOADER
|
||||
/**
|
||||
* Load libace.z.so library when boot the devices
|
||||
*/
|
||||
void LoadAceLib();
|
||||
#endif
|
||||
|
||||
private:
|
||||
const std::string deviceNull_ = "/dev/null";
|
||||
|
@ -28,10 +28,8 @@
|
||||
#include "main_thread.h"
|
||||
#include "securec.h"
|
||||
|
||||
#if defined(ABILITY_LIBRARY_LOADER) || defined(APPLICATION_LIBRARY_LOADER)
|
||||
#include <dirent.h>
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
#define GRAPHIC_PERMISSION_CHECK
|
||||
constexpr static size_t ERR_STRING_SZ = 64;
|
||||
@ -159,7 +157,6 @@ void AppSpawnServer::ConnectionPeer()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ACEABILITY_LIBRARY_LOADER
|
||||
void AppSpawnServer::LoadAceLib()
|
||||
{
|
||||
std::string acelibdir("/system/lib/libace.z.so");
|
||||
@ -173,7 +170,6 @@ void AppSpawnServer::LoadAceLib()
|
||||
}
|
||||
HiLog::Info(LABEL, "MainThread::LoadAbilityLibrary. End calling dlopen.");
|
||||
}
|
||||
#endif
|
||||
|
||||
bool AppSpawnServer::ServerMain(char *longProcName, int64_t longProcNameLen)
|
||||
{
|
||||
@ -182,9 +178,9 @@ bool AppSpawnServer::ServerMain(char *longProcName, int64_t longProcNameLen)
|
||||
return false;
|
||||
}
|
||||
std::thread(&AppSpawnServer::ConnectionPeer, this).detach();
|
||||
#ifdef ACEABILITY_LIBRARY_LOADER
|
||||
|
||||
LoadAceLib();
|
||||
#endif
|
||||
|
||||
while (isRunning_) {
|
||||
std::unique_lock<std::mutex> lock(mut_);
|
||||
dataCond_.wait(lock, [this] { return !this->appQueue_.empty(); });
|
||||
|
@ -24,6 +24,9 @@
|
||||
#undef private
|
||||
#undef protected
|
||||
|
||||
#include <dirent.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
using namespace testing;
|
||||
using namespace testing::ext;
|
||||
using namespace OHOS::AppSpawn;
|
||||
|
Loading…
Reference in New Issue
Block a user