Add an exception handling about debug mode 66/180766/1
authorHwankyu Jhun <h.jhun@samsung.com>
Mon, 4 Jun 2018 05:26:42 +0000 (14:26 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Mon, 4 Jun 2018 05:27:18 +0000 (14:27 +0900)
If the launch request is for debugging an application,
the launchpad doesn't prepare the app socket. Some debugger
closes all fds before executing the application.

Change-Id: I3342e8270a4ff552139d6da51b3132ec1a957b6a
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/launchpad.c

index bc49310..ebc4d29 100755 (executable)
@@ -854,9 +854,11 @@ static int __prepare_exec(const char *appid, const char *app_path,
        if (ret < 0)
                return PAD_ERR_FAILED;
 
-       ret = _prepare_app_socket();
-       if (ret < 0)
-               return PAD_ERR_FAILED;
+       if (bundle_get_type(kb, AUL_K_SDK) == BUNDLE_TYPE_NONE) {
+               ret = _prepare_app_socket();
+               if (ret < 0)
+                       return PAD_ERR_FAILED;
+       }
 
        return 0;
 }