The Windows CreateProcess() system call creates a new process. What is the equivalent system call in UNIX?
NTCreateProcess() |
||
fork() |
||
process() |
||
getpid() |
Ans. fork()
Explanation - Process is a running instance of a program.processes are created through different system calls , one of them is fork().This system call help parent process in creating child process .child process is an exact duplicate of parent process.The child process has an exact copy of all the memory of the parent process.The child process receives a process number (PID) of its own from the operating system.
Execution of parent process is suspended until child process executes.Return value of fork indicates the process we are in .
0-Means we are in child process
positive number means we are in parent process
negative number means error ocurred.
Get Answers For Free
Most questions answered within 1 hours.