Exec
From Hackepedia
Jump to navigationJump to search
The exec()
system call replaces the current process with a completely different process. This is commonly used in shells, servers, and any number of other types of software, where one program hands off execution to a different program.
A common proceedure is to "fork()
and exec()
". Here, a process will fork()
to create a new "child" process with the same environment and settings as the "parent" (the original process). The child process will then exec
the new program and carry on execution.
Most command line shells use this proceedure for running programs.