When handling the RESTART_LOADER command, it is necessary to check whether the
loader_context is launchable.
In some cases, a problem occurred by launching a loader in a non-executable state.
This patch fixes this case.
Change-Id: I835799364d4dcd4e0d8c30e0d60a52f5ec08ff10
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
if (loader_context->RefCount() == 0)
loader_context->Dispose();
- if (loader_context->GetPid() < 1)
+ if (loader_context->GetPid() < 1 && loader_context->IsLaunchable())
loader_context->Prepare();
_W("[PAD_CMD_RESTART_LOADER] loader_name: %s, pid: %d",