[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20100617202032.GC1626@ghostprotocols.net>
Date: Thu, 17 Jun 2010 17:20:32 -0300
From: Arnaldo Carvalho de Melo <acme@...hat.com>
To: Ian Munsie <imunsie@....ibm.com>
Cc: linux-kernel@...r.kernel.org,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Paul Mackerras <paulus@...ba.org>, Ingo Molnar <mingo@...e.hu>,
Frederic Weisbecker <fweisbec@...il.com>,
Tom Zanussi <tzanussi@...il.com>
Subject: Re: [PATCH] perf: prevent kill(0, SIGTERM);
Em Wed, Jun 09, 2010 at 06:38:00PM +1000, Ian Munsie escreveu:
> At exit, perf record will kill the process it was profiling by sending a
> SIGTERM to child_pid (if it had been initialised), but in certain
> situations child_pid may be 0 and perf would mistakenly kill more
> processes than intended.
>
> child_pid is set to the return of fork() to either 0 or the pid of the
> child. Ordinarily this would not present an issue as the child calls
> execvp to spawn the process to be profilled and would therefore never
> run it's sig_atexit and never attempt to kill pid 0.
before:
[root@...lia mingo]# perf record bla
bla: No such file or directory
Terminated
after:
[root@...lia mingo]# perf record bla
bla: No such file or directory
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.006 MB perf.data (~259 samples) ]
[root@...lia mingo]#
Got it, queuing it in perf/urgent,
Thanks!
- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists