Quote:
Originally Posted by
JamesByars
oh, I get it. The parent is replaced by the child. Yes, makse sense.
Thanks.
Almost, there is no child process created.
In UNIX a process is a running entity managed by the operating system and a program is a file on disk.
In MS-DOS, Windows, OS/2, classic MacOS the only way to create a process was to run a program and the OS would create a new process to run the program.
In UNIX they are two separate activities (a) create a new process, ie, fork and (b) replace the current running program with a new program, eg exec.
So in Windows what would be "CreateProcess" is in UNIX a fork followed by exec. Although 99% of the time we want to fork/exec there are a few occasions where replacing the current program is the thing to do.