Saturday 15 August 2015

Differences Between Fork and Exec

Cited from Differences between exec and fork

"A process is an execution environment that consists of instruction, user-data, and system-data segments, as well as lots of other resources acquired at runtime, whereas a program is a file containing instructions and data that are used to initialize the instruction and user-data segments of a process."

"""
  • fork() creates a duplicate of the current process
  • exec() replaces the program in the current process with another program
"""

No comments:

Post a Comment