From: Jan Kiszka <jan.kiszka@web.de>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] tcf-agent: Fix daemon termination
Date: Sun, 30 Apr 2017 17:28:01 +0200 [thread overview]
Message-ID: <3bd366a6-a31c-e4c8-688c-e24e84f1520c@web.de> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1407 bytes --]
From: Jan Kiszka <jan.kiszka@siemens.com>
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@siemens.com>
---
meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init | 11 +----------
1 file changed, 1 insertion(+), 10 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 6303280aae..bd602c67cb 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"
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]
next reply other threads:[~2017-04-30 15:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-30 15:28 Jan Kiszka [this message]
2017-05-01 16:41 ` [PATCH] tcf-agent: Fix daemon termination Martin Kelly
2017-06-01 0:17 ` Martin Kelly
2017-06-01 5:45 ` Martin Kelly
2017-06-06 10:11 ` Jan Kiszka
2017-06-06 17:28 ` Martin Kelly
2017-06-07 16:08 ` Burton, Ross
2017-06-07 16:29 ` Jan Kiszka
2017-06-07 16:33 ` Martin Kelly
2017-06-07 16:34 ` Jan Kiszka
2017-06-07 19:09 ` Burton, Ross
2017-06-13 16:35 ` Martin Kelly
2017-06-13 16:38 ` Burton, Ross
2017-06-13 16:46 ` Martin Kelly
2017-06-13 16:52 ` Burton, Ross
2017-06-13 16:56 ` Martin Kelly
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3bd366a6-a31c-e4c8-688c-e24e84f1520c@web.de \
--to=jan.kiszka@web.de \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox