Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
cancel
Showing results for 
Search instead for 
Did you mean: 

Invoking an executable.

Mustafa Motiwala
Occasional Advisor

Invoking an executable.

Well, this is basically covered in a programming topic, but, how does one execute another binary from a c code? like the system function in perl. how does one achieve the same on linux?
3 REPLIES
Balaji N
Honored Contributor

Re: Invoking an executable.

hi
i am not good at programming but there exists a system function in C as well to call an external binary/script.


regards
balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
Mustafa Motiwala
Occasional Advisor

Re: Invoking an executable.

yes, and its execle() but the problem is that these functions dont return control to the calling prog. i need control back after the prog. ends.

Re: Invoking an executable.

Hi

I'm no coder, but you have a system function in c as well, where you can call an external binary to be executed:

system("/path/to/executable_to_run");

This works when calling a shell script at least, and I'm able to return control to the c program after calling the shell script.

rgds Bjoern.