On Wed, Apr 30, 2014 at 09:24:08AM +0900, Namhyung Kim wrote:
> Hi Jiri and Peter,
> 
> On Tue, 29 Apr 2014 13:37:47 +0200, Jiri Olsa wrote:
> > On Tue, Apr 29, 2014 at 01:19:39PM +0200, Peter Zijlstra wrote:
> >> On Tue, Apr 29, 2014 at 12:56:54PM +0200, Jiri Olsa wrote:
> >> > 
> >> >   perf_counter tools: Propagate signals properly
> >> >   commit f7b7c26e01e51fe46097e11f179dc71ce7950084
> >> >   Author: Peter Zijlstra <[email protected]>
> >> >   Date:   Wed Jun 10 15:55:59 2009 +0200
> >> > 
> >> > but I dont think we need to do that
> >> 
> >> But but but, then you're re-introducing that fail again? That no good.
> 
> FYI, it's already gone with 804f7ac78803 ("perf record: handle death by
> SIGTERM").

oops, sry for late reply.. I just saw v4

I see, so that kill got deleted, only 'signal(signr, SIG_DFL);' stayed

I think we could take this patch, since it's not introducing regression
(if there's any) in this regard and figure out the bash stuff below later

> 
> >
> > well, I was trying the testcase you mentioned in the changelog
> > and it seemed to work for me.. ;-) I guess I was lucky to hit
> > the bash time window..
> >
> >   while :; do perf stat ./foo ; done
> >
> > so how does this work? bash will kill the loop if perf's wait
> > status is WIFSIGNALED?
> 
> I'm not sure but isn't it *bash* to catch signal and terminate the
> loop?  It seems the wait status of child has no business with the loop
> termination.  Am I missing something?

peterz, any comment? before we start digging in bash.. ;-)

thanks,
jirka

> 
>   $ cat suicide.c
>   #include <signal.h>
>   
>   int main(void)
>   {
>     raise(SIGTERM);
>     return 0;
>   }
>   
>   $ gcc -o suicide suicide.c
>   
>   $ while :; do ./suicide; done
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   Terminated
>   ...
> 
> 
> Thanks,
> Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to