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