Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

check if pid exists c

#include <sys/stat.h>
[...]
struct stat sts;
if (stat("/proc/<pid>", &sts) == -1 && errno == ENOENT) {
  // process doesn't exist
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #pid #exists
ADD COMMENT
Topic
Name
7+7 =