开发者

Does execv replace the current process like this?

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 g开发者_运维百科et executed, since whatever was started by execv replaces the current process?


They wouldn't be executed, unless the execv() call failed. execv() completely replaces the program running in the process that calls it.


They would not get executed, unless you forked the thread and called execv on just one of them.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜