Getting the return value of an external program

I wrote a program p1.out

that returns me a value according to its arguments. I have run this program from another p2.out

using the execv function and I want to get the return value p1.out

. How should I do it? I know that I cannot checkif(execv(...)==1)

+3


source to share





All Articles