I have got a program which checks if there\'s a version update on the server. Now I have to do something like
if(update_avail) {
system(\"updater.exe\");
There is no fork()
in Win32. The API call you are looking for is called ::CreateProcess()
. This is the underlying function that system() is using. ::CreateProcess()
is inherently asynchronous: unless you are specifically waiting on the returned process handle, the call is non-blocking.
There is also a higher-level function ::ShellExecute()
, that you could use if you are not redirecting process standard I/O or doing the waiting on the process. This has an advantage of searching the system PATH for the executable file, as well as the ability to launch batch files and even starting a program associated with a document file.