Question: Replacing a Process Image - 1 % The exec family of functions replaces the current process with another which is created according to the arguments

Replacing a Process Image -1%
The exec family of functions replaces the current process with another which is created according to the
arguments given to the exec function.
Study this family of functions by the "man" command:
$ man execl
/test_exec.cpp
#include cout "fork program startingln";
pid = fork();
switch (pid){
case -1:
cout "Fork failure!ln";
return 1;
case 0 :
message = "This is the childln";
n=5;
break;
default:
message = "This is the parentln";
n=3;
break;
}
for (int i=0; i Replacing a Process Image -1%
The exec family of functions replaces the current process with another which is created according to the
arguments given to the exec function.
Study this family of functions by the "man" command:
$ man execl
Itest_exec.cpp
#include 0;ls-lDuplicating a Process Image -1%
We can use fork to duplicate a process. The duplicated process will be run independently from its parent.
#include
 Replacing a Process Image -1% The exec family of functions replaces

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!