I am measuring the CPU usage of a running server process.
I use a shell to run
perf stat -p <pid> & to attach to the process, run some commands, and
kill -INT the
perf to get the result.
The perf stat will output its result when being interrupted. But how do I capture the output from
kill -INT into a bash variable?