summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIoana Grigoropol <ioanax.grigoropol@intel.com>2013-04-08 15:54:06 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-08 18:02:47 +0100
commit9dccc97bfcc237198e14985d49805890062e7c3a (patch)
tree772d3aa23ffe587bcd33ff17dc238555a0e4cac3
parent02ae9b357676c904721d92a9c6f74ecc6b7a4476 (diff)
downloadpoky-9dccc97bfcc237198e14985d49805890062e7c3a.tar.gz
tcf-agent: Use kill instead of killproc to stop agent
When shutting down a core-image-lsb-sdk image, there is a lot of time spend stopping tcf-agent, which slows down the whole process. The reason for this slowdown is the fact that it tries in a loop to kill tcf-agent service by using killproc with the path of the executable and killproc does not seem to available in lsb images. This patch fixes the issue by using "kill" instead of "killproc". [Yocto #3928] (From OE-Core rev: 251361eb78176a04e3da00e0f77b7f3ff459d571) Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@intel.com> Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/tcf-agent/tcf-agent/fix_tcf-agent.init.patch6
-rw-r--r--meta/recipes-devtools/tcf-agent/tcf-agent_git.bb2
2 files changed, 5 insertions, 3 deletions
diff --git a/meta/recipes-devtools/tcf-agent/tcf-agent/fix_tcf-agent.init.patch b/meta/recipes-devtools/tcf-agent/tcf-agent/fix_tcf-agent.init.patch
index fefaf040bb..8ea5b43d53 100644
--- a/meta/recipes-devtools/tcf-agent/tcf-agent/fix_tcf-agent.init.patch
+++ b/meta/recipes-devtools/tcf-agent/tcf-agent/fix_tcf-agent.init.patch
@@ -13,7 +13,7 @@ Upstream-Status: Inappropriate [poky-specific script]
13 install -c -t $(INSTALLROOT)$(INCLUDE)/tcf/services -m 644 services/*.h 13 install -c -t $(INSTALLROOT)$(INCLUDE)/tcf/services -m 644 services/*.h
14--- /dev/null 14--- /dev/null
15+++ b/tcf-agent.init 15+++ b/tcf-agent.init
16@@ -0,0 +1,78 @@ 16@@ -0,0 +1,80 @@
17+#!/bin/sh 17+#!/bin/sh
18+### BEGIN INIT INFO 18+### BEGIN INIT INFO
19+# Provides: tcf-agent 19+# Provides: tcf-agent
@@ -50,14 +50,16 @@ Upstream-Status: Inappropriate [poky-specific script]
50+ stop) 50+ stop)
51+ echo -n "Stopping $DAEMON_NAME: " 51+ echo -n "Stopping $DAEMON_NAME: "
52+ count=0 52+ count=0
53+ pid=$(/bin/pidof $DAEMON_PATH)
53+ while [ -n "`/bin/pidof $DAEMON_PATH`" -a $count -lt 10 ] ; do 54+ while [ -n "`/bin/pidof $DAEMON_PATH`" -a $count -lt 10 ] ; do
54+ killproc $DAEMON_PATH >& /dev/null 55+ kill $pid > /dev/null 2>&1
55+ sleep 1 56+ sleep 1
56+ RETVAL=$? 57+ RETVAL=$?
57+ if [ $RETVAL != 0 -o -n "`/bin/pidof $DAEMON_PATH`" ] ; then 58+ if [ $RETVAL != 0 -o -n "`/bin/pidof $DAEMON_PATH`" ] ; then
58+ sleep 3 59+ sleep 3
59+ fi 60+ fi
60+ count=`expr $count + 1` 61+ count=`expr $count + 1`
62+ pid=$(/bin/pidof $DAEMON_PATH)
61+ done 63+ done
62+ rm -f /var/lock/subsys/$DAEMON_NAME 64+ rm -f /var/lock/subsys/$DAEMON_NAME
63+ if [ -n "`/bin/pidof $DAEMON_PATH`" ] ; then 65+ if [ -n "`/bin/pidof $DAEMON_PATH`" ] ; then
diff --git a/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb b/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
index 4d43c62c47..ced2b416b1 100644
--- a/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
+++ b/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://edl-v10.html;md5=522a390a83dc186513f0500543ad3679"
7 7
8SRCREV = "4ef94ecb927a8912c3d79ce137182247786cff8f" 8SRCREV = "4ef94ecb927a8912c3d79ce137182247786cff8f"
9PV = "0.4.0+git${SRCPV}" 9PV = "0.4.0+git${SRCPV}"
10PR = "r0" 10PR = "r1"
11 11
12SRC_URI = "git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git;protocol=git \ 12SRC_URI = "git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git;protocol=git \
13 file://fix_ranlib.patch \ 13 file://fix_ranlib.patch \