callback from exe called with system()
I am not sure this is posted in the right board, but I want to add a volume shadow copy function (windows) inside a C program that in turn calls rsync. The program is done in C (as opposed to shell) to allow effecient error checking and verfication.
The vshadow.exe (from VSS SDK) command will create the shadow copy, but it only exists as long as vshadow.exe is running. This is solved in shell examples by callback to the original script with a variable defined so the script knows this is the callback.
My question is, is it possible to have a c program call an external program like vshadow.exe (called with system() ) to return a callback to a function inside the c program?
any help will be greatly appreciated.
What the callback should do
When the callback is made, windows is saying the shadow build is complete and the shadow is active. At this point, the name of the shadow can be pulled from a file vshadow.exe builds. I would use the name of that shadow to run a backup process, pulling files from the shadow instead from the original files. In this way, I can back up files even if a process has them open.