1
0
Fork 0

Improve log message when fgfs_lock.pid exists

Part of addressing:
https://sourceforge.net/p/flightgear/codetickets/2133/

Still need to decide about a better GUI dialog for this.
This commit is contained in:
James Turner 2020-04-29 11:43:47 +01:00
parent 489e6abb2a
commit 954385ce0d

View file

@ -514,7 +514,9 @@ bool fgInitHome()
int err = ::flock(fd, LOCK_EX | LOCK_NB);
if (err < 0) {
if ( errno == EWOULDBLOCK) {
SG_LOG(SG_GENERAL, SG_ALERT, "flightgear instance already running, switching to FG_HOME read-only.");
SG_LOG(SG_GENERAL, SG_ALERT, "flightgear instance already running, switching to FG_HOME read-only. ");
SG_LOG(SG_GENERAL, SG_ALERT, "Couldn't flock() file at:" << pidPath);
// set a marker property so terrasync/navcache don't try to write
// from secondary instances
fgSetBool("/sim/fghome-readonly", true);