Is there anyway in Go to check if a proces is running by searching by process name? I see ways to do it with PID, however I don't have the PID to search by. Thanks.
http://www.faqs.org/faqs/unix-faq/faq/part3/section-10.html, Find PID of a Process by Name without Using popen() or system()
No direct way available. You can use os/exec with pidof or pgrep to do this. Or read into procfs.
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