From 41e7d9f27848aa8601a2586cf3e7b86fe15dd00c Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Thu, 2 Feb 2017 19:25:28 +0900 Subject: Add the pid to the environment When the application is launched by the debugger, the application is a child process of the debugger. The process group of the appliation is not equal to the process id of the debugger. If the process id is not equal to the process pid of the environment variable, the aul socket API will create the socket link to recevie the request. Requires: - https://review.tizen.org/gerrit/112668 Change-Id: I2f63a9cf74f13157b6cd39c8ad5d37489a37165a Signed-off-by: Hwankyu Jhun (cherry picked from commit e85b65847a5904ebe3bebd1290b030066b02b5e1) --- src/launchpad_common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/launchpad_common.c b/src/launchpad_common.c index f1b4532..e71c511 100644 --- a/src/launchpad_common.c +++ b/src/launchpad_common.c @@ -630,6 +630,7 @@ error: void _set_env(appinfo_t *menu_info, bundle *kb) { const char *str; + char buf[MAX_LOCAL_BUFSZ]; str = bundle_get_val(kb, AUL_K_STARTTIME); if (str != NULL) @@ -657,6 +658,9 @@ void _set_env(appinfo_t *menu_info, bundle *kb) str = bundle_get_val(kb, AUL_K_API_VERSION); if (str != NULL) setenv("TIZEN_API_VERSION", str, 1); + + snprintf(buf, sizeof(buf), "%d", getpid()); + setenv("AUL_PID", buf, 1); } char **_create_argc_argv(bundle *kb, int *margc) -- cgit v1.2.3