Reputation: 33056
If in my code, I were to call execv, and then I had several lines of code after the call to execv, would those lines get executed, or would they not get executed, since whatever was started by execv replaces the current process?
Upvotes: 0
Views: 1691
Reputation: 7953
They would not get executed, unless you forked the thread and called execv on just one of them.
Upvotes: 1
Reputation: 34591
They wouldn't be executed, unless the execv()
call failed. execv()
completely replaces the program running in the process that calls it.
Upvotes: 2