C program in Linux or Unix to make a child process orphan:
Making child as orphan
#include<stdio.h>
main()
{
int pid,pid1;
pid=fork();
if(pid>0)
{
printf("From parent process\n");
printf("Parent process %d \n",getpid());
}
else
{
sleep(1);
printf("From child process\n");
printf("child process %d \n",getpid());
}}
Information about resetting and configuring Mobile phones (Java, Android, Symbian etc), educational articles especially for programming in C, C++ and Java and more about Computers and operating systems
No comments :
Post a Comment