trace-cmd record: Create a pidfile when using --daemonize

When used with --daemonize, create a pidfile at
/var/run/trace-cmd-record.pid during the duration
of the recording, and delete it after we're done.

Link: https://lore.kernel.org/linux-trace-devel/20230626091635.3002827-4-avidanborisov@gmail.com

Signed-off-by: Avidan Borisov <avidanborisov@gmail.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
3 files changed