From: ho.namkoong Date: Sun, 23 Jun 2013 06:48:25 +0000 (+0900) Subject: [Title] Fix launch script X-Git-Tag: submit/tizen_2.2/20130623.112729~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e2400270b1d0f09b6873148a3eddb8ce9c718260;p=sdk%2Ftarget%2Fsdbd.git [Title] Fix launch script [Type] [Module] [Priority] [CQ#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] Change-Id: Ifdcc35e288fa8881c14ae636fe24ccb61d34acfd --- diff --git a/sdk_launch b/sdk_launch index cf48ea8..eb42e68 100755 --- a/sdk_launch +++ b/sdk_launch @@ -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 diff --git a/src/sdb.c b/src/sdb.c index 112ccf0..4c3c877 100644 --- 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; +// } }