Showing posts with label parent. Show all posts
Showing posts with label parent. Show all posts

How to make parent process wait till Completion of Child Process (Joining parent with child process)

How to make the parent process wait till the completion of execution of child process. The following C program makes the parent process to wait till the completion of its child process.

#include<stdio.h>
main()
{

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());
}