c program get pid of command code example Example: how to get pid of c process #include <sys/types.h> #include <unistd.h> pid_t getpid(void);