cristianv Posted March 11, 2014 Report Share Posted March 11, 2014 Hello. How can you allow only one instance of an executable on linux? I've tried to add allowmultipleinstances=False in the config file, and it does not work. In Windows it works perfectly... Thanks! Cristian Quote Link to comment
Ton Plomp Posted March 11, 2014 Report Share Posted March 11, 2014 Perhpaps you need the correct capitalization? Linux (in general) is capital aware while Windows is not. If I look at a windows LabVIEW.exe it has the following string somewhere in the binary file: allowMultipleInstances so you might need to CamelCase your INI key. I'd test: AllowMultipleInstances allowMultipleInstances And I'd test it with different spellings of False/false/FALSE Ton Quote Link to comment
cristianv Posted March 12, 2014 Author Report Share Posted March 12, 2014 Thank you. I've tested several way of writting like you suggested but nothing seems to be working... Quote Link to comment
hooovahh Posted March 12, 2014 Report Share Posted March 12, 2014 I wouldn't think capitalization is the issue, simply because I thought that it defaulted to false. Meaning if there was no entry in the INI it wouldn't allow multiple instances, and only if you set it to true does its behavior change. Sorry never see this before. Quote Link to comment
Ton Plomp Posted March 13, 2014 Report Share Posted March 13, 2014 What version of LabVIEW are you using? Ton Quote Link to comment
cristianv Posted March 13, 2014 Author Report Share Posted March 13, 2014 I use LV2013 Quote Link to comment
Rolf Kalbermatter Posted March 13, 2014 Report Share Posted March 13, 2014 Under Windows there is a special root loop in LabVIEW that registers a LabVIEW Window Class on startup. That supposedly fails when it is already registered and in old days LabVIEW simply passed control to that other instance and then terminated. The allowMultipleInstances ini key is a fairly new addition (well around LabVIEW 7 or so) that seems to make LabVIEW not terminate on RegisterClass() returning an error but instead simply continues. Under Linux there is no such mechanisme and it is even more unusual for an application to not allow being started more than once. They would have to add some internal IPC mechanisme to check for that on startup and I'm sure that never really has come up so far and even a Product Suggestion has a very low chance to ever make it into LabVIEW. allowMultipleInstances most likely is nowhere present in any non-Windows version of LabVIEW. However, at least in Linux (and I suppose on OSX too) you can easily do this by creating a startup shell script for your LabVIEW application and check in there with shell commands for the existence of another instance of the same app. Look here for a fairly simple possibility to do that. 1 Quote Link to comment
cristianv Posted March 17, 2014 Author Report Share Posted March 17, 2014 Thank you for the details, I'll try the script method. Cristian Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.