Search This Blog

C Program to Show Process ID in Linux

This program is to show the process id (pid) in UNIX or Linx
The system call getpid() returns the process id of current process.

#include<stdio.h>
int main()
{
printf("\n Parent Process ID %d",getppid());
}

No comments: