title: How to kill a process in C when pid is know
body: <p>I have a cleanup process which needs to kill the process whose PID is passed as an argument to it.</p>
  
  <p>I can very well use the <code>kill(pid_t, SIGKILL)</code> to kill it. However the PID which i get is an integer value. So i cant get a pid_t out of it. Is there any way to use and integer pid to kill the process?</p>
  
  <p>Well. I can very well use <code>system("kill -9 &lt;pid&gt;");</code></p>
  
  <p>I am looking for a solution from C.</p>