[oe-commits] [openembedded-core] 43/53: tcf-agent: Fix daemon termination

git at git.openembedded.org git at git.openembedded.org
Tue Nov 21 14:45:04 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch morty
in repository openembedded-core.

commit 1e6235de0a3f6302cee37332f03b1ba403c789d1
Author: Jan Kiszka <jan.kiszka at web.de>
AuthorDate: Tue Nov 14 20:56:19 2017 +0100

    tcf-agent: Fix daemon termination
    
    The upstream init script uses SIGUSR2 to terminate that daemon because
    SIGTERM is ignored. As the killproc function does not support specifying
    a signal, switch to start-stop-daemon. Drop the retry loop because
    SIGUSR2 is lethal for agent.
    
    Signed-off-by: Jan Kiszka <jan.kiszka at siemens.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
    Signed-off-by: Javier Viguera <javier.viguera at digi.com>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init b/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init
index 6303280..f902085 100755
--- a/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init
+++ b/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init
@@ -33,16 +33,7 @@ case "$1" in
 
     stop)
         echo -n "Stopping $DAEMON_NAME: "
-        count=0
-        while [ -n "`/bin/pidof $DAEMON_PATH`" -a $count -lt 10 ] ; do
-            killproc $DAEMON_PATH >& /dev/null
-            sleep 1
-            RETVAL=$?
-            if [ $RETVAL != 0 -o -n "`/bin/pidof $DAEMON_PATH`" ] ; then
-                sleep 3
-            fi
-            count=`expr $count + 1`
-        done
+        start-stop-daemon -K -q -x $DAEMON_PATH -s USR2
         rm -f /var/lock/subsys/$DAEMON_NAME
         if [ -n "`/bin/pidof $DAEMON_PATH`" ] ; then
             echo "FAIL"
@@ -72,4 +63,3 @@ case "$1" in
 esac
 
 exit $RETVAL
-

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list