Any way to stop nvidia-smi loop except ctrl+c?

I am currently monitoring the power draw of my GPU using nvidia-smi in a cpp program.

The process probed every 20ms by using

nvidia-smi -q -d power -lms 20 -f outfile

Another process is launching the cuda kernels.

Is there any way to stop any “nvidia-smi” process from the second process?

Thank you!

“pkill nvidia-smi” or many other methods to send standard TERM signal to process ?