But i beleieve using a fork/exec combination will leave the original problem as 
it is. 

fork return pid of child process while exec never reuturns. How can i get the 
exit status of my script in parent process.

-Sanjeev.




________________________________
From: shadyabhi <[email protected]>
To: [email protected]
Sent: Wed, January 20, 2010 11:03:00 PM
Subject: Re: [c-prog] Getting shell script exit status in C++ program.

  
Sanjeev Gupta wrote:
> 
>
> Hi Friends,
>
> I am invoking a shell script in a C++ program using 'system()' 
> finction (I believe system() is the only way to call a script from C++ 
> program. Please correct me if i am wrong).
>
> The proble is system function does not return me the exit status of 
> the script. Can anybody tell me how i can get the same.
>
> Regards,
> Sanjeev 
>
> [Non-text portions of this message have been removed]
>
> 
You can also use fork..

[Non-text portions of this message have been removed]





      

[Non-text portions of this message have been removed]

Reply via email to