I have a program written in C#, running on Linux using Mono. The program writes its PID to a file. Now I want to check wether a process with this PID is running on start up. Is there a way using Mono? If not, how can I accomplish this using standard Linux functions/tools? Or do I have to check /proc/PID/cmdline?
Share
Standard functionality would be to run
kill -0 PIDto see if the process is running and check the exit code, 0 function is running.