Executing binary from within C++ program

Hey guys. If I have a linux binary file 'bin1' and I have another, separate binary file 'bin2', is there a standard way in Linux to allow 'bin1' to invoke 'bin2'?

I ask because I am writing a program that can update itself by downloading a new binary, remove the current binary (which is currently running in RAM), rename the downloaded binary to match the original, then just before my main returns I want to invoke this new binary. Is this normal? :)

Thanks in advance :)
Last edited on
Topic archived. No new replies allowed.