tcf-agent: add -USR2 to stop/kill initscript
cover tcf-agent: add -USR2 to stop/kill initscript
This fixes the tcf-agent init script so /etc/init.d/tcf-agent stop works. It adds a -USR2 to the kill command like upstream does. -brian
The following changes since commit 381897c64069ea43d595380a3ae913bcc79cf7e1:
build-appliance-image: Update to master head revision (2017-05-01 08:56:47 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib bavery/tcf-agent/10858
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=bavery/tcf-agent/10858
brian avery (1):
tcf-agent: add -USR2 to stop/kill initscript
meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
--
1.9.1
PATCH 1/1 tcf-agent: add -USR2 to stop/kill initscript
The current initscript was lacking a -USR2 signal in the stop section. This resulted in /etc/init.d/tcf-agent stop; taking roughly 10 seconds then failing to kill the tcf-agent process. This patch brings us in line with how upstream stops the agent.
Fixes [YOCTO #10858]
--- meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init +1 -2
@@ -35,7 +35,7 @@ case "$1" in echo -n "Stopping $DAEMON_NAME: " count=0 while [ -n "`/bin/pidof $DAEMON_PATH`" -a $count -lt 10 ] ; do - killproc $DAEMON_PATH >& /dev/null + kill -USR2 `pidofproc $DAEMON_PATH` >& /dev/null sleep 1 RETVAL=$? if [ $RETVAL != 0 -o -n "`/bin/pidof $DAEMON_PATH`" ] ; then
@@ -72,4 +72,3 @@ case "$1" in esac exit $RETVAL -
Signature · 1 line
1.9.1
Looks like this is addressing the same problem as Jan's patch from earlier today. I think the differences are:
- kill vs start-stop-daemon
- Jan removed the retry loop while this patch does not
Quoted 31 lines · brian avery
The current initscript was lacking a -USR2 signal in the stop section. This resulted in
/etc/init.d/tcf-agentstop; taking roughly 10 seconds then failing to kill the tcf-agent process. This patch brings us in line with how upstream stops the agent.Fixes [YOCTO #10858]
Signed-off-by brian avery <[email protected]>--- meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init +1
-2@@ -35,7 +35,7 @@ case "$1" in echo -n "Stopping $DAEMON_NAME: " count=0 while [ -n "`/bin/pidof $DAEMON_PATH`" -a $count -lt 10 ] ; do - killproc $DAEMON_PATH >& /dev/null + kill -USR2 `pidofproc $DAEMON_PATH` >& /dev/null sleep 1 RETVAL=$? if [ $RETVAL != 0 -o -n "`/bin/pidof $DAEMON_PATH`" ] ; then@@ -72,4 +72,3 @@ case "$1" in esac exit $RETVAL -
Agreed. I didn't see his patch, when I did the fix (and didn't check again when posting the fix). Amusing we did it at the same time. I'm fine with either patch as the loop shouldn't be triggered in general, nor do I think it would really help ...
-brian
an intel employee
Quoted 48 lines · Martin Kelly
Looks like this is addressing the same problem as Jan's patch from earlier today. I think the differences are:
- kill vs start-stop-daemon
- Jan removed the retry loop while this patch does not
Quoted 27 lines · brian avery
The current initscript was lacking a -USR2 signal in the stop section. This resulted in
/etc/init.d/tcf-agentstop; taking roughly 10 seconds then failing to kill the tcf-agent process. This patch brings us in line with how upstream stops the agent.Fixes [YOCTO #10858]
Signed-off-by brian avery <[email protected]>--- meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init +1
-1@@ -35,7 +35,7 @@ case "$1" in echo -n "Stopping $DAEMON_NAME: " count=0 while [ -n "`/bin/pidof $DAEMON_PATH`" -a $count -lt 10 ] ; do - killproc $DAEMON_PATH >& /dev/null + kill -USR2 `pidofproc $DAEMON_PATH` >& /dev/null sleep 1 RETVAL=$? if [ $RETVAL != 0 -o -n "`/bin/pidof $DAEMON_PATH`" ] ; thenmeta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init case "$1" in
Quoted 6 lines
meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init +0
-2@@ -72,4 +72,3 @@ case "$1" in esac exit $RETVAL - --_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core