Does control return after "execvp()"

Posted by Ajay Garg on Stack Overflow See other posts from Stack Overflow or by Ajay Garg
Published on 2010-05-19T06:58:46Z Indexed on 2010/05/19 7:00 UTC
Read the original article Hit count: 262

Filed under:
|

"execvp()" replaces the current program with the to-be-execed program (of course in the same process context). So, putting, say, any printf() calls after execvp() won't work. That is what the docs say, and I have verified it as well.

But then, why is _exit() needed..? Does it so happen that the control DOES return to statements post execvp() ?

I will be grateful for any pointers.

Thanks

© Stack Overflow or respective owner

Related posts about execvp

Related posts about exit