Learn more about cloning repositories
You have read-only access
PID should be stored in pid_t, not int or long. find_pid_by_name() was returning 0 or -1 in last array element, but -1 was never checked. We can use just 0 intead.