mirror of
https://gitee.com/openharmony/ability_ability_runtime
synced 2024-12-19 07:58:03 +00:00
libc.hook模式关闭超时处理任务
Signed-off-by: jiangyuan0000 <jiangyuan29@huawei.com>
This commit is contained in:
parent
eee81229fd
commit
7099d9d38a
@ -24,6 +24,7 @@
|
||||
#include "hitrace_meter.h"
|
||||
#include "hilog_wrapper.h"
|
||||
#include "in_process_call_wrapper.h"
|
||||
#include "parameter.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AAFwk {
|
||||
@ -675,6 +676,16 @@ void AbilityConnectManager::PostTimeOutTask(const std::shared_ptr<AbilityRecord>
|
||||
delayTime = AbilityManagerService::CONNECT_TIMEOUT;
|
||||
}
|
||||
|
||||
// check libc.hook_mode
|
||||
const int bufferLen = 128;
|
||||
char paramOutBuf[bufferLen] = {0};
|
||||
const char *hook_mode = "startup:";
|
||||
int ret = GetParameter("libc.hook_mode", "", paramOutBuf, bufferLen - 1);
|
||||
if (ret > 0 && strncmp(paramOutBuf, hook_mode, strlen(hook_mode)) == 0) {
|
||||
HILOG_DEBUG("Hook_mode: no timeoutTask");
|
||||
return;
|
||||
}
|
||||
|
||||
auto timeoutTask = [abilityRecord, connectManager = shared_from_this(), resultCode]() {
|
||||
HILOG_WARN("Connect or load ability timeout.");
|
||||
connectManager->HandleStartTimeoutTask(abilityRecord, resultCode);
|
||||
|
Loading…
Reference in New Issue
Block a user