Home » NO IDEA » getpid

getpid

Blog Stats

  • 15,880 hits
April 2013
M T W T F S S
« Mar   Oct »
1234567
891011121314
15161718192021
22232425262728
2930  

getpid() is the used to return the process id for the parent process

Process: The program which is on execution is called as the process

some attributes

Process id -uniquely given by the kernel to distinguish between several process in the system

General Note :Kernel assign the unique id with the delay so that no confusion occur in identifying the process

 

The required header files

<unistd.h>

<sys/types.h>

 

Program code

#include<stdio.h>
#include<unistd.h>

#include<sys/types.h>
int main()
{
printf(“\n Process id of the process is =%d”,getpid());
return 0;
}

 

Ouptut:

Process id of the process is =9029

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: