[Title] bug fix for launch problem
authorgreatim <jaewon81.lim@samsung.com>
Tue, 23 Apr 2013 08:03:18 +0000 (17:03 +0900)
committergreatim <jaewon81.lim@samsung.com>
Tue, 23 Apr 2013 08:03:18 +0000 (17:03 +0900)
[Desc.]
[Issue]

Change-Id: I9c705dedf717fca26c8ab3251f42416246638848

daemon/da_command
daemon/daemon.c

index a9eaa27..84dcad5 100755 (executable)
@@ -5,6 +5,7 @@ MANAGER=/usr/bin/da_manager
 EVENT=/usr/bin/da_event
 FIND=/usr/bin/find
 GETAPPINSTALLPATH="/usr/bin/pkgcmd -a"
+PORTFILE=/tmp/port.da
 
 print_usage()
 {
@@ -20,6 +21,7 @@ print_usage()
 kill_manager()
 {
        $KILL $MANAGER
+       rm -f $PORTFILE
 }
 
 kill_app()
@@ -29,6 +31,7 @@ kill_app()
 
 run_manager()
 {
+       kill_manager
        $MANAGER
 }
 
index 50a7ac9..6d9cbd1 100644 (file)
@@ -111,10 +111,7 @@ static int get_input_id(char* inputname)
        // determine input_id query command
        if(unlikely(query_cmd_type == 0))
        {
-               sprintf(command, "ls /lib/udev/input_id; echo cmd_ret:$?;");
-               cmd_fp = popen(command, "r");
-               _file_read(cmd_fp, buffer, BUF_SIZE);
-               if(strstr(buffer, "cmd_ret:0"))         // there is /lib/udev/input_id
+               if(access("/lib/udev/input_id", F_OK) == 0)             // there is /lib/udev/input_id
                {
                        query_cmd_type = 1;
                }