.cmd = cmd,
.data = data
};
+ app_status_h app_status;
info = __create_reply_info(pid, uid, cmd, clifd, data);
if (!info)
return -ENOMEM;
+ if (cmd == APP_TERM_BY_PID_ASYNC ||
+ cmd == APP_TERM_BY_PID ||
+ cmd == APP_TERM_INSTANCE_ASYNC ||
+ cmd == APP_TERM_REQ_BY_PID ||
+ cmd == APP_TERM_BY_PID_SYNC) {
+ app_status = _app_status_find(pid);
+ if (cmd != APP_TERM_INSTANCE_ASYNC ||
+ _app_status_get_app_type(app_status) !=
+ AT_COMPONENT_BASED_APP) {
+ _app_status_update_status(app_status,
+ STATUS_DYING,
+ false, true);
+ }
+ }
+
+
ret = amd_app_request_broker_send(&request,
__app_request_result_handler, info);
if (ret < 0) {
_anr_monitor_add_timer(pid, cmd);
- return 0;
+ return ret;
}
int _resume_app(int pid, request_h req)
found = g_list_find_custom(__app_group_list, leader_id,
__compare_group_id);
if (!found) {
+ if (leader_pid != pid) {
+ _E("%d is not leader(%d)", pid, leader_pid);
+ __destroy_app_group_context(ctx);
+ return NULL;
+ }
+
group = __create_app_group(leader_id, leader_pid);
if (!group) {
_E("Failed to create app group. %s:%d",
bool attach_below = false;
app_group_node_h caller_node;
app_group_node_h next_node;
+ amd_app_status_h app_status;
+ uid_t uid;
_D("app_group_start");
ctx = __app_group_add(leader_pid, leader_id, pid, id,
caller_pid, caller_id, launch_mode,
false, recycle, before_wid, attach_below);
+ if (!ctx) {
+ app_status = amd_app_status_find_by_pid(pid);
+ if (app_status) {
+ uid = amd_app_status_get_uid(app_status);
+ amd_launch_term_sub_inst(pid, id, uid);
+ }
+ }
} else {
ctx = __app_group_add(pid, id, pid, id,
caller_pid, caller_id, launch_mode,