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
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
testexec.cpp
#include cout "fork program startingln";
pid fork;
switch pid
case :
cout "Fork failure!ln;
return ;
case :
message "This is the childln";
;
break;
default:
message "This is the parentln";
n;
break;
for int i; i Replacing a Process Image
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
Itestexec.cpp
#include ;lDuplicating a Process Image
We can use fork to duplicate a process. The duplicated process will be run independently from its parent.
#include
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
