I want to know how to check whether is program running and run this program if not.
If $pid
is empty, the process is not running:
my $pid = `ps -C $progname -o pid=`; # non-windows solution, sorry
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With