Understanding signals in Linux
What is a process ID? A process ID a.k.a. PID is literally what the name says, it is a number to uniquely identify a running process. You can print your program’s PID in C using the getpid() function included on the header file unistd.h.
int main(void) { while (1) { printf("PID: %d\n", getpid()); sleep(1); } } output: “ PID: 12345 ”
note: “12345” is a PID for an arbitrary process.