Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   VisBuildPro.cfg contention? (https://www.kinook.com/Forum/showthread.php?t=3556)

CREvans 04-04-2008 10:26 AM

VisBuildPro.cfg contention?
 
I have implemented a system where a Visual Build script can auto-refresh itself if the script on disk has a different time/date stamp than the running script. This is working fine. However, despite my best efforts otherwise, I'm still sometimes getting an error in the implementation.

As background, my build script is called from the command line via the /b option to autostart and exit when done. All parts of the script are in a wrapper group which loops continually as long as an exit macro is not present (which is set if a build script update is needed).

If a change is identified, I go to a section of script which sets the exit macro, saves off the build script to a temporary (junk) file (so it doesn't ask if I want to save the modified build script, in case the script was paused or changed by a user on the machine), and then calls the updated script.

The current script should then exit and the new one start. The new one starts fine, but the old one will sometimes not exit cleanly, but instead pop up a message saying that it can't save configuration values to VisBuildPro.cfg because it's being used by another process. I can only assume that it's the newly launched script which is trying to read from such a file while the old script is still exiting.

However, I can't find this file on disk anywhere, so it must be a temporary file that's only present for a very short time. Does anyone have a suggestion on how to fix this file contention issue for this VisBuildPro.cfg temporary file?

kinook 04-04-2008 11:27 AM

See here for details on the configuration files location:
http://www.visualbuild.com/Manual/co...ationfiles.htm

VBP only updates the .config file on exit if changes were made to the configuration, so you might avoid making changes to the config from the build. Another possibility would be to add a Wait step (to wait a few seconds) after the step that launches the secondary .bld file so that if the first instance does update the config file on exit, it will do so after the second instance has already read the file.

CREvans 04-04-2008 12:05 PM

Thanks, I have a pause after the save but before the launch of the new script, but I don't have a pause after the launch. I'll try that and see how that works.


All times are GMT -5. The time now is 02:47 PM.


Copyright © 1999-2023 Kinook Software, Inc.