Added a comment in Perf to explain kill correctness.
Review: https://reviews.apache.org/r/37424
diff --git a/src/linux/perf.cpp b/src/linux/perf.cpp
index cab6271..cdc5f83 100644
--- a/src/linux/perf.cpp
+++ b/src/linux/perf.cpp
@@ -193,7 +193,9 @@
virtual void finalize()
{
- // Kill the perf process if it's still running.
+ // Kill the perf process (if it's still running) by sending
+ // SIGTERM to the signal handler which will then SIGKILL the
+ // perf process group created by setupChild.
if (perf.isSome() && perf.get().status().isPending()) {
kill(perf.get().pid(), SIGTERM);
}