Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果在我的代码中,我要调用 execv,然后在调用 execv 之后有几行代码,这些行会被执行,还是不会被执行,因为 execv 启动的任何内容都会替换当前进程?
execv()除非调用失败 ,否则它们不会被执行。execv()完全替换在调用它的进程中运行的程序。
execv()
它们不会被执行,除非您分叉线程并仅在其中一个上调用 execv。