What is the difference between fork and exec command in Unix? - Questions

This is a discussion on What is the difference between fork and exec command in Unix? - Questions ; What is the difference between fork and exec command in Unix? Regards Brownaryan www.unixhelpline.blogspot.com...

+ Reply to Thread
Results 1 to 2 of 2

Thread: What is the difference between fork and exec command in Unix?

  1. What is the difference between fork and exec command in Unix?

    What is the difference between fork and exec command in Unix?

    Regards

    Brownaryan
    www.unixhelpline.blogspot.com

  2. Re: What is the difference between fork and exec command in Unix?

    hi,
    Simply put, fork duplicates your shell (file descriptors, etc) in a subshell. Usually a forked process will then exec in that subshell.
    exec exec's the command in your current shell, basically co-opting it.
    In pure versions of exec, if you do, just at the shell prompt.

+ Reply to Thread