All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] tcf-agent: add -USR2 to stop/kill initscript
@ 2017-05-01 21:58 brian avery
  2017-05-01 21:59 ` [PATCH 1/1] " brian avery
  0 siblings, 1 reply; 4+ messages in thread
From: brian avery @ 2017-05-01 21:58 UTC (permalink / raw)
  To: openembedded-core

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/1] tcf-agent: add -USR2 to stop/kill initscript
  2017-05-01 21:58 [PATCH 0/1] tcf-agent: add -USR2 to stop/kill initscript brian avery
@ 2017-05-01 21:59 ` brian avery
  2017-05-01 23:15   ` Martin Kelly
  0 siblings, 1 reply; 4+ messages in thread
From: brian avery @ 2017-05-01 21:59 UTC (permalink / raw)
  To: openembedded-core

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]

Signed-off-by: brian avery <brian.avery@intel.com>
---
 meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init | 3 +--
 1 file changed, 1 insertion(+), 2 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..13497cc 100755
--- a/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init
+++ b/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init
@@ -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
-
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] tcf-agent: add -USR2 to stop/kill initscript
  2017-05-01 21:59 ` [PATCH 1/1] " brian avery
@ 2017-05-01 23:15   ` Martin Kelly
  2017-05-08 15:01     ` Brian Avery
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Kelly @ 2017-05-01 23:15 UTC (permalink / raw)
  To: brian avery, openembedded-core; +Cc: Jan Kiszka

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

On 05/01/2017 02:59 PM, brian avery wrote:
> 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]
>
> Signed-off-by: brian avery <brian.avery@intel.com>
> ---
>  meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init | 3 +--
>  1 file changed, 1 insertion(+), 2 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..13497cc 100755
> --- a/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init
> +++ b/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init
> @@ -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
> -
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] tcf-agent: add -USR2 to stop/kill initscript
  2017-05-01 23:15   ` Martin Kelly
@ 2017-05-08 15:01     ` Brian Avery
  0 siblings, 0 replies; 4+ messages in thread
From: Brian Avery @ 2017-05-08 15:01 UTC (permalink / raw)
  To: Martin Kelly; +Cc: Jan Kiszka, Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 2131 bytes --]

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

On Mon, May 1, 2017 at 4:15 PM, Martin Kelly <mkelly@xevo.com> wrote:

> 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
>
>
> On 05/01/2017 02:59 PM, brian avery wrote:
>
>> 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]
>>
>> Signed-off-by: brian avery <brian.avery@intel.com>
>> ---
>>  meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init | 3 +--
>>  1 file changed, 1 insertion(+), 2 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..13497cc 100755
>> --- a/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init
>> +++ b/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init
>> @@ -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
>> -
>>
>> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 3151 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-05-08 15:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-01 21:58 [PATCH 0/1] tcf-agent: add -USR2 to stop/kill initscript brian avery
2017-05-01 21:59 ` [PATCH 1/1] " brian avery
2017-05-01 23:15   ` Martin Kelly
2017-05-08 15:01     ` Brian Avery

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.