When a new app is launched by receiving a request to execute it,
if the onboot feature is activated, the app process is duplicated.
This problem occurs because the CheckStatus() method does not properly handle
the confirmation of pending items.
The problem is fixed by modifying the socket option.
Change-Id: Icc4478766a25fdf34073dd331dc878478c577b58
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
b.Delete(AUL_K_APPID);
b.Add(AUL_K_APPID, appid);
amd::RequestPtr req = amd::RequestManager::GetInst().CreateRequestLocal(
- APP_START, uid, getpid(), kb);
+ APP_START, uid, getpid(), kb, AUL_SOCK_QUEUE | AUL_SOCK_BUNDLE);
if (req == nullptr) {
_E("Out of memory");
return -1;
}
RequestPtr RequestManager::CreateRequestLocal(int cmd, uid_t uid, int pid,
- bundle* kb) {
+ bundle* kb, int opt) {
auto builder = Request::Builder()
.SetPID(pid)
.SetTargetPID(0)
.SetUID(getuid())
.SetTargetUID(uid)
.SetCmd(cmd)
- .SetOption(AUL_SOCK_NONE)
+ .SetOption(opt)
.SetEventListener(this);
if (kb != nullptr)
RequestManager& operator=(const RequestManager&) = delete;
bool RegisterCommands(const request_cmd_dispatch* cmds, int cnt);
- RequestPtr CreateRequestLocal(int cmd, uid_t uid, int pid, bundle* kb);
+ RequestPtr CreateRequestLocal(int cmd, uid_t uid, int pid, bundle* kb,
+ int opt = AUL_SOCK_NONE);
void PushRequest(RequestPtr req, amd_priority_e priority);
bool UserInit(uid_t uid);
bool Init();