From: Junghoon Park Date: Wed, 9 Dec 2015 00:32:26 +0000 (+0900) Subject: Connect launchpad-process-pool after loader create-callback is called X-Git-Tag: accepted/tizen/mobile/20151209.024938^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f5de8917629b374c8765c70b047dc4891f5ba220;p=platform%2Fcore%2Fappfw%2Flaunchpad.git Connect launchpad-process-pool after loader create-callback is called Change-Id: I8207d723290a4c4461bd9f620a64353efccc922d Signed-off-by: Junghoon Park --- diff --git a/src/launchpad_lib.c b/src/launchpad_lib.c index 2344c52..d72292f 100644 --- a/src/launchpad_lib.c +++ b/src/launchpad_lib.c @@ -280,12 +280,6 @@ static int __before_loop(int argc, char **argv) int client_fd; int ret = -1; - client_fd = _connect_to_launchpad(__loader_type, __loader_id); - if (client_fd == -1) { - _D("Connecting to candidate process was failed."); - return -1; - } - #ifdef _APPFW_FEATURE_LOADER_PRIORITY int res = setpriority(PRIO_PROCESS, 0, LOWEST_PRIO); @@ -305,7 +299,6 @@ static int __before_loop(int argc, char **argv) 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); ret = 0; } @@ -318,6 +311,14 @@ static int __before_loop(int argc, char **argv) getpid(), errno, strerror_r(errno, err_str, sizeof(err_str))); } #endif + client_fd = _connect_to_launchpad(__loader_type, __loader_id); + if (client_fd == -1) { + _D("Connecting to candidate process was failed."); + return -1; + } + + __loader_adapter->add_fd(__loader_user_data, client_fd, __receiver_cb); + return ret; }