I need to kill java process, that runs main class blabla.class. I can use function kill(pid_t, SIGKILL) for this reason, but I need to get PID ID.
I could run linux command ps-ax | grep blabla to find PID ID. What is the best way to do this using C ?