[Title] Fix launch script
authorho.namkoong <ho.namkoong@samsung.com>
Sun, 23 Jun 2013 06:48:25 +0000 (15:48 +0900)
committerho.namkoong <ho.namkoong@samsung.com>
Sun, 23 Jun 2013 06:48:25 +0000 (15:48 +0900)
[Type]
[Module]
[Priority]
[CQ#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

Change-Id: Ifdcc35e288fa8881c14ae636fe24ccb61d34acfd

sdk_launch
src/sdb.c

index cf48ea8..eb42e68 100755 (executable)
@@ -115,7 +115,7 @@ then
     if [ "" != "$attach_id" ]
     #debug attach
     then
-        cmd="$COV_TEST_PREFIX /home/developer/sdk_tools/gdbserver/gdbserver :$port --attach $attach_id $launch_app_mode"
+        cmd="$COV_TEST_PREFIX /home/developer/sdk_tools/gdbserver/gdbserver :$port --attach $attach_id"
     #debug
     else
         if [ "" != "$result_mode" ]
@@ -124,7 +124,7 @@ then
         else
             result_mode="DEBUG"
         fi
-        cmd="/usr/bin/launch_app $pkgid.$exe __AUL_SDK__ $result_mode __DLP_DEBUG_ARG__ :$port $args $launch_app_mode"
+        cmd="/usr/bin/launch_app $pkgid.$exe __AUL_SDK__ $result_mode __DLP_DEBUG_ARG__ :$port $launch_app_mode $args"
 #       cmd="$COV_TEST_PREFIX /home/developer/sdk_tools/gdbserver/gdbserver :$port /opt/apps/$pkgid/bin/$exe"
     fi
 else
@@ -132,9 +132,9 @@ else
     then
         if [ "" != "$result_mode" ]
         then
-            cmd="/usr/bin/launch_app $pkgid.$exe __AUL_SDK__ $result_mode $args $launch_app_mode"
+            cmd="/usr/bin/launch_app $pkgid.$exe __AUL_SDK__ $result_mode $launch_app_mode $args"
         else
-            cmd="/usr/bin/launch_app $pkgid.$exe $launch_app_mode"
+            cmd="/usr/bin/launch_app $pkgid.$exe"
         fi
     else
         if [ "$mode" = "da" ]
@@ -153,7 +153,7 @@ else
                 result_mode="OPROFILE"
             fi
         fi
-        cmd="/usr/bin/launch_app $pkgid.$exe __AUL_SDK__ $result_mode $args $launch_app_mode"
+        cmd="/usr/bin/launch_app $pkgid.$exe __AUL_SDK__ $result_mode"
     fi
 fi
 
index 112ccf0..4c3c877 100644 (file)
--- a/src/sdb.c
+++ b/src/sdb.c
@@ -694,9 +694,9 @@ static BOOL WINAPI ctrlc_handler(DWORD type)
 static void sdb_cleanup(void)
 {
     usb_cleanup();
-    if(required_pid > 0) {
-        kill(required_pid, SIGKILL);
-    }
+//    if(required_pid > 0) {
+//        kill(required_pid, SIGKILL);
+//    }
 }
 
 void start_logging(void)
@@ -1036,29 +1036,31 @@ static void execute_required_process() {
 
     pclose(pre_proc_file);
 
-    pid_t pid = fork();
-
-    switch (pid) {
-        case -1:
-            D("fork failed\n");
-            break;
-        case 0:
-            if(setsid() == -1) {
-                D("Fail to set session id of debug launchpad daemon\n");
-                exit(1);
-            }
-            if(chdir("/") < 0) {
-                D("Fail debug launchpad daemon to chdir\n");
-                exit(1);
-            }
-            execl("/usr/bin/debug_launchpad_preloading_preinitializing_daemon", "debug_launchpad_preloading_preinitializing_daemon", NULL);
-            D("exec failed\n");
-            exit(1);
-            break;
-        default:
-            required_pid = pid;
-            break;
-    }
+    system("/usr/bin/debug_launchpad_preloading_preinitializing_daemon &");
+
+//    pid_t pid = fork();
+//
+//    switch (pid) {
+//        case -1:
+//            D("fork failed\n");
+//            break;
+//        case 0:
+//            if(setsid() == -1) {
+//                D("Fail to set session id of debug launchpad daemon\n");
+//                exit(1);
+//            }
+//            if(chdir("/") < 0) {
+//                D("Fail debug launchpad daemon to chdir\n");
+//                exit(1);
+//            }
+//            execl("/usr/bin/debug_launchpad_preloading_preinitializing_daemon", "debug_launchpad_preloading_preinitializing_daemon", NULL);
+//            D("exec failed\n");
+//            exit(1);
+//            break;
+//        default:
+//            required_pid = pid;
+//            break;
+//    }
 
 }