| 111 | } |
| 112 | |
| 113 | void finalize() override |
| 114 | { |
| 115 | // Kill the perf process (if it's still running) by sending |
| 116 | // SIGTERM to the signal handler which will then SIGKILL the |
| 117 | // perf process group created by the supervisor process. |
| 118 | if (perf.isSome() && perf->status().isPending()) { |
| 119 | kill(perf->pid(), SIGTERM); |
| 120 | } |
| 121 | |
| 122 | promise.discard(); |
| 123 | } |
| 124 | |
| 125 | private: |
| 126 | void execute() |