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

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -