app_pkt_t *_recv_pkt_raw(int fd, int *clifd, struct ucred *cr);
int _send_pkt_raw(int client_fd, app_pkt_t *pkt);
int _connect_to_launchpad(int type);
-void _set_oom(void);
void _set_env(app_info_from_db * menu_info, bundle * kb);
char** _create_argc_argv(bundle * kb, int *margc);
/* TODO : should be add to check permission in the kernel*/
setsid();
- /* SET OOM*/
- _set_oom();
-
/* SET PRIVILEGES*/
if (bundle_get_val(kb, AUL_K_PRIVACY_APPID) == NULL) {
_D("appId: %s / pkg_type : %s / app_path : %s ", appId, menu_info->pkg_type,
return -1;
}
-void _set_oom(void)
-{
- char buf[MAX_LOCAL_BUFSZ];
- FILE *fp;
-
- /* we should reset oomadj value as default because child
- inherits from parent oom_adj*/
- snprintf(buf, MAX_LOCAL_BUFSZ, "/proc/%d/oom_adj", getpid());
- fp = fopen(buf, "w");
- if (fp == NULL)
- return;
- fprintf(fp, "%d", -16);
- fclose(fp);
-}
-
void _set_env(app_info_from_db * menu_info, bundle * kb)
{
const char *str;
}
#endif
__preexec_init(argc, argv);
+
+ /* Set new session ID & new process group ID*/
+ /* In linux, child can set new session ID without check permission */
+ /* TODO : should be add to check permission in the kernel*/
+ setsid();
+
if (__loader_callbacks->create) {
__loader_callbacks->create(argc, argv, __loader_type, __loader_user_data);
__loader_adapter->add_fd(__loader_user_data, client_fd, __receiver_cb);
__preload_init(argc, argv);
__preload_init_for_process_pool();
- /* Set new session ID & new process group ID*/
- /* In linux, child can set new session ID without check permission */
- /* TODO : should be add to check permission in the kernel*/
- setsid();
-
- /* SET OOM*/
- _set_oom();
-
elm_init_cnt = elm_init(g_argc, g_argv);
_D("[candidate] elm init, returned: %d", elm_init_cnt);