From 9ce5e5c21acc6718cd5804b3121b34851427e0a5 Mon Sep 17 00:00:00 2001 From: greatim Date: Tue, 23 Apr 2013 17:03:18 +0900 Subject: [PATCH] [Title] bug fix for launch problem [Desc.] [Issue] Change-Id: I9c705dedf717fca26c8ab3251f42416246638848 --- daemon/da_command | 3 +++ daemon/daemon.c | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/daemon/da_command b/daemon/da_command index a9eaa27..84dcad5 100755 --- a/daemon/da_command +++ b/daemon/da_command @@ -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 } diff --git a/daemon/daemon.c b/daemon/daemon.c index 50a7ac9..6d9cbd1 100644 --- a/daemon/daemon.c +++ b/daemon/daemon.c @@ -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; } -- 2.7.4