what is difference between fork() and exec() system calls in operating system
fork():
- fork() starts a new process which is a copy of the one that calls it,
- Both parent and child processes are executed simultaneously in case of fork()
exec():
- exec replaces the current process image with another (different) one.
- Control never returns to the original program unless there is an exec() error.
Comments
Post a Comment