Creates a new process( Child process) by using "fork()" function in C
"Fork" system call use for creates a new process, which is called child process.Which
runs concurrently with process (which process called system call “Fork”) &
this process is called parent process.
Ex-:
There is a program it’s called P1.
P1---à
main(){
int a=10,b=5;
int a=10,b=5;
printf(”d“,%a);
fork();
printf(“%d”,a+b);
printf(“%d”,c);
}
Suppose “child1” is child process
of p1
After running fork(), P1 creates
his child. Suppose it’s name “child1”. Child1 copied all commands below the “fork()”
command line in program p1.
Child1 -à
printf(“%d”,a+b);
printf(“%d”,c);
child1
doesn’t copy variable “a”. but it know variable a.
after, parents & Childs programs are running concurrently(interrupted
the programs)
Good job girl.. Keep it up👌
ReplyDeleteGreat work Mrs.kaumadie 😁
ReplyDeleteGreat work❤
ReplyDeleteGreat work
ReplyDeleteGood job
ReplyDeleteThanks All ❤️
ReplyDeleteGreat work 💪
ReplyDeleteTnx mrs. Kaumadie.
ReplyDeleteGood job..
ReplyDeleteGood job
ReplyDeleteGood work..😂😂
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteGreat work
ReplyDelete