Fgfs.pid: Difference between revisions

Jump to navigation Jump to search
2,227 bytes added ,  18 March 2017
m
https://sourceforge.net/p/flightgear/mailman/search/?q=%22fgfs.pid%22&mail_list=all
mNo edit summary
m (https://sourceforge.net/p/flightgear/mailman/search/?q=%22fgfs.pid%22&mail_list=all)
Line 2: Line 2:


<code>fgfs.pid</code>
<code>fgfs.pid</code>
bit of insight on the commonly reported failures on the forum about the Nav-cache being read-only. It looks as if the whole nav-cache thing may have been completely mis-leading - the problem is nothing to do with the nav-cache at all, it’s unfortunate that the error mentioned it, since that has rather distracted from finding the solution. (All of the above assuming we have found the solution, which is still uncertain but looking quite likely). The actual problem seems to be the fgfs.pid file we use to ensure only one copy of FGFS is running with write-access to FG_HOME - all other copies run with read-only access. On POSIX I use standard open+unlink behaviour to create the PID file but ensure we don’t ever get stale ones, even if the system crashes. I then used Google / StackOverflow to find equivalent code for Windows - CreateFile with a ‘delete file on close’ flag. However, it looks as if this behaviour may be fragile in the case of non-clean exits / power-offs. I’ve just pushed a patch to next to change to a named-mutex-based solution on Windows (POSIX is unchanged), which can’t ever get stuck with stale data, since there is no file at all. <ref>{{cite web
  |url    =  https://sourceforge.net/p/flightgear/mailman/message/35691413/
  |title  =  <nowiki> [Flightgear-devel] Windows nav-cache permission issue </nowiki>
  |author =  <nowiki> James Turner </nowiki>
  |date  =  Feb 27th, 2017
  |added  =  Feb 27th, 2017
  |script_version = 0.40
  }}</ref>


the problem with the read-only navigation cache on Windows is simple, and has been [[$FG HOME|$FG HOME]] that is making the home directory read-only.</li><li> Install FG 2017.1.2 which no longer uses a PID file for determining if two FlightGear instances are running (on MS Windows).</li><ref>{{cite web
the problem with the read-only navigation cache on Windows is simple, and has been [[$FG HOME|$FG HOME]] that is making the home directory read-only.</li><li> Install FG 2017.1.2 which no longer uses a PID file for determining if two FlightGear instances are running (on MS Windows).</li><ref>{{cite web
Line 43: Line 53:
   |added  =  Mar 17th, 2017  
   |added  =  Mar 17th, 2017  
   |script_version = 0.36  
   |script_version = 0.36  
  }}</ref>
For the archives, the two relevant forum threads are: https://forum.flightgear.org/viewtopic.php?t=31746 https://forum.flightgear.org/viewtopic.php?t=31720 Note that forum user commsbiff partly confirmed theombie fgfs.pid file being the issue and SkinnierSteve fully confirmed it. A few more tests on fresh $FG_HOME's with navigation cache errors after an upgrade should confirm this without doubt.<ref>{{cite web
  |url    =  https://sourceforge.net/p/flightgear/mailman/message/35692101/
  |title  =  <nowiki> Re: [Flightgear-devel] Windows nav-cache permission issue </nowiki>
  |author =  <nowiki> Edward d'Auvergne </nowiki>
  |date  =  Feb 27th, 2017
  |added  =  Feb 27th, 2017
  |script_version = 0.40
   }}</ref>
   }}</ref>


Navigation menu