unix - Check running processes in C -


Can anyone tell me how a Unix process is running inside a C program with an investigation process ID? I know that I can call the system () and use the ps command, but I do not want to call the system ().

Use of

:

  if (kill (pid, 0) == 0) To process the process is running or zombie, and if (error == ESRCH) {/ * / P>    report (" ... ") or use scratches (error). / Div> 

Comments