what is the difference between fork and exec command?
Hi friends,
Can anybody tell me what is the difference between fork and exec command? Regards Brownaryan |
fork executes two child processes, exec turns over execution to a new process.
exec behaves the same as forking a process, then exiting the unforked branch. |
Read the manual.
exec: The exec() family of functions replaces the current process image with a new process image. [translation: Uses the process structures of the calling process to run a new program.] fork: fork() creates a new process by duplicating the calling process. Simple really - they don't have anything to do with eachother. |
All times are GMT -5. The time now is 05:42 PM. |