This PR introduces an option (-z-print-pid) to be used when Env_vars.debug is set to true. This would print the PIDs of all the processes which magic-trace attaches to.
A demo output looks like this:
$ MAGIC_TRACE_DEBUG=1 magic-trace attach -p 245085,251541 -z-print-pid
Passed PIDs to perf: 245085,251541
<rest of the output>
<Ctrl+C>
$ /bin/cat &
[2] 251834
[2] + suspended (tty input) cat
$ MAGIC_TRACE_DEBUG=1 magic-trace attach -z-print-pid
<choose /bin/cat process using fzf>
Passed PIDs to perf: 251834
<rest of the output>
<Ctrl+C>
This PR introduces an option (
-z-print-pid
) to be used whenEnv_vars.debug
is set totrue
. This would print the PIDs of all the processes which magic-trace attaches to.A demo output looks like this:
Done in collaboration with @Mantra-7.
Fixes #256.