summaryrefslogtreecommitdiff
path: root/src/launchpad.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/launchpad.c')
-rwxr-xr-xsrc/launchpad.c34
1 files changed, 3 insertions, 31 deletions
diff --git a/src/launchpad.c b/src/launchpad.c
index 4fb2490..01c91b8 100755
--- a/src/launchpad.c
+++ b/src/launchpad.c
@@ -327,11 +327,7 @@ static int __real_send(int clifd, int ret)
static void __send_result_to_caller(int clifd, int ret, const char *app_path)
{
- char *cmdline;
- int count = 0;
- char path[PATH_MAX];
-
- _W("Check app launching");
+ _W("send result: %d", ret);
if (clifd == -1)
return;
@@ -342,28 +338,6 @@ static void __send_result_to_caller(int clifd, int ret, const char *app_path)
return;
}
- snprintf(path, sizeof(path), "/run/aul/apps/%d/%d/.app-sock",
- getuid(), ret);
- _D("socket path: %s", path);
- do {
- if (access(path, F_OK) == 0) {
- _D("%s exists", path);
- break;
- }
-
- _D("-- now wait socket creation --");
- usleep(50 * 1000);
- count++;
- } while (count < 20);
-
- cmdline = _proc_get_cmdline_bypid(ret);
- if (cmdline == NULL) {
- _E("The app process might be terminated while we are wating %d",
- ret);
- __real_send(clifd, -1); /* abnormally launched*/
- return;
- }
-
if (__real_send(clifd, ret) < 0)
__kill_process(ret);
}
@@ -402,7 +376,7 @@ static int __exec_loader_process(void *arg)
__signal_unblock_sigchld();
__signal_fini();
- _close_all_fds(0);
+ _close_all_fds();
if (execv(argv[LOADER_ARG_PATH], argv) < 0)
_E("Failed to prepare candidate_process");
@@ -591,8 +565,6 @@ static int __prepare_exec(const char *appid, const char *app_path,
if (*file_name == '\0')
return PAD_ERR_INVALID_PATH;
- _prepare_listen_sock();
-
memset(process_name, '\0', AUL_PR_NAME);
snprintf(process_name, AUL_PR_NAME, "%s", file_name);
prctl(PR_SET_NAME, process_name);
@@ -621,7 +593,7 @@ static int __exec_app_process(void *arg)
__signal_unblock_sigchld();
__signal_fini();
- _close_all_fds(0);
+ _close_all_fds();
_delete_sock_path(getpid(), getuid());
ret = _mount_legacy_app_path(launch_arg->menu_info->root_path,