summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunghoon, Park <jh9216.park@samsung.com>2015-11-17 14:28:57 +0900
committerJunghoon, Park <jh9216.park@samsung.com>2015-11-17 14:50:32 +0900
commit9f6121118ea3af0e790ed65639b6b178d70bd579 (patch)
tree8d3126c95718d92268d9534b1b2618390ae70a98
parentad1a35219f47af9788b1a9ed0477215604b25a39 (diff)
downloadlaunchpad-9f6121118ea3af0e790ed65639b6b178d70bd579.tar.gz
launchpad-9f6121118ea3af0e790ed65639b6b178d70bd579.tar.bz2
launchpad-9f6121118ea3af0e790ed65639b6b178d70bd579.zip
Change-Id: I08f9c42dc8dfd09d098b93376210ed1f4821ec22 Signed-off-by: Junghoon, Park <jh9216.park@samsung.com>
-rw-r--r--inc/launchpad_common.h1
-rwxr-xr-xsrc/launchpad.c3
-rw-r--r--src/launchpad_common.c15
-rw-r--r--src/launchpad_lib.c6
-rw-r--r--src/launchpad_loader.c8
5 files changed, 6 insertions, 27 deletions
diff --git a/inc/launchpad_common.h b/inc/launchpad_common.h
index 0934a0c..ddd2fab 100644
--- a/inc/launchpad_common.h
+++ b/inc/launchpad_common.h
@@ -73,7 +73,6 @@ int _create_server_sock(int pid);
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);
diff --git a/src/launchpad.c b/src/launchpad.c
index 0d5e742..423126b 100755
--- a/src/launchpad.c
+++ b/src/launchpad.c
@@ -449,9 +449,6 @@ static int __prepare_exec(const char *appId, const char *app_path,
/* 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,
diff --git a/src/launchpad_common.c b/src/launchpad_common.c
index 6b86b45..afa2dee 100644
--- a/src/launchpad_common.c
+++ b/src/launchpad_common.c
@@ -499,21 +499,6 @@ error:
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;
diff --git a/src/launchpad_lib.c b/src/launchpad_lib.c
index c22cd3a..376c3c0 100644
--- a/src/launchpad_lib.c
+++ b/src/launchpad_lib.c
@@ -302,6 +302,12 @@ static int __before_loop(int argc, char **argv)
}
#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);
diff --git a/src/launchpad_loader.c b/src/launchpad_loader.c
index 8f081c7..13e3a3f 100644
--- a/src/launchpad_loader.c
+++ b/src/launchpad_loader.c
@@ -80,14 +80,6 @@ static void __loader_create_cb(int argc, char **argv, int type, void *user_data)
__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);