]> code.ossystems Code Review - openembedded-core.git/commitdiff
tcf-agent: Use kill instead of killproc to stop agent
authorIoana Grigoropol <ioanax.grigoropol@intel.com>
Mon, 8 Apr 2013 12:54:06 +0000 (15:54 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 8 Apr 2013 16:59:45 +0000 (17:59 +0100)
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]

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>
meta/recipes-devtools/tcf-agent/tcf-agent/fix_tcf-agent.init.patch
meta/recipes-devtools/tcf-agent/tcf-agent_git.bb

index fefaf040bb4c3bb3b04c1726b3c2f73284d25681..8ea5b43d53dd17058d22773fd4e4b2916ff83e69 100644 (file)
@@ -13,7 +13,7 @@ Upstream-Status: Inappropriate [poky-specific script]
        install -c -t $(INSTALLROOT)$(INCLUDE)/tcf/services -m 644 services/*.h
 --- /dev/null
 +++ b/tcf-agent.init
-@@ -0,0 +1,78 @@
+@@ -0,0 +1,80 @@
 +#!/bin/sh
 +### BEGIN INIT INFO
 +# Provides:          tcf-agent
@@ -50,14 +50,16 @@ Upstream-Status: Inappropriate [poky-specific script]
 +    stop)
 +        echo -n "Stopping $DAEMON_NAME: "
 +        count=0
++        pid=$(/bin/pidof $DAEMON_PATH)
 +        while [ -n "`/bin/pidof $DAEMON_PATH`" -a $count -lt 10 ] ; do
-+            killproc $DAEMON_PATH >& /dev/null
++            kill $pid > /dev/null 2>&1
 +            sleep 1
 +            RETVAL=$?
 +            if [ $RETVAL != 0 -o -n "`/bin/pidof $DAEMON_PATH`" ] ; then
 +                sleep 3
 +            fi
 +            count=`expr $count + 1`
++            pid=$(/bin/pidof $DAEMON_PATH)
 +        done
 +        rm -f /var/lock/subsys/$DAEMON_NAME
 +        if [ -n "`/bin/pidof $DAEMON_PATH`" ] ; then
index 4d43c62c478bc18e0cce374c5312e3267a9c5660..ced2b416b160d1f5a7edbcefa1cc54c5074e6c0f 100644 (file)
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://edl-v10.html;md5=522a390a83dc186513f0500543ad3679"
 
 SRCREV = "4ef94ecb927a8912c3d79ce137182247786cff8f"
 PV = "0.4.0+git${SRCPV}"
-PR = "r0"
+PR = "r1"
 
 SRC_URI = "git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git;protocol=git \
            file://fix_ranlib.patch \