aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie Thielker2017-03-13 12:48:55 +0000
committerMelanie Thielker2017-03-31 14:38:41 +0100
commit5109dc955fa25562675b7ae37a79bf5504f2e394 (patch)
tree33e7ac9589ac8ef7396c75be5df6b1b88b482d91 /OpenSim
parentAllow setting the stats log file location in OpenSim.ini rather than app.exe.... (diff)
downloadopensim-SC-5109dc955fa25562675b7ae37a79bf5504f2e394.zip
opensim-SC-5109dc955fa25562675b7ae37a79bf5504f2e394.tar.gz
opensim-SC-5109dc955fa25562675b7ae37a79bf5504f2e394.tar.bz2
opensim-SC-5109dc955fa25562675b7ae37a79bf5504f2e394.tar.xz
Set a startup marker to let external scripts know the scene is up.
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 2a0bd3c..f4bf0b2 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1212,6 +1212,28 @@ namespace OpenSim.Region.Framework.Scenes
1212 StatsReporter.OnSendStatsResult += SendSimStatsPackets; 1212 StatsReporter.OnSendStatsResult += SendSimStatsPackets;
1213 StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; 1213 StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats;
1214 1214
1215 IConfig restartConfig = config.Configs["RestartModule"];
1216 if (restartConfig != null)
1217 {
1218 string markerPath = restartConfig.GetString("MarkerPath", String.Empty);
1219
1220 if (markerPath != String.Empty)
1221 {
1222 string path = Path.Combine(markerPath, RegionInfo.RegionID.ToString() + ".started");
1223 try
1224 {
1225 string pidstring = System.Diagnostics.Process.GetCurrentProcess().Id.ToString();
1226 FileStream fs = File.Create(path);
1227 System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
1228 Byte[] buf = enc.GetBytes(pidstring);
1229 fs.Write(buf, 0, buf.Length);
1230 fs.Close();
1231 }
1232 catch (Exception)
1233 {
1234 }
1235 }
1236 }
1215 } 1237 }
1216 1238
1217 public Scene(RegionInfo regInfo) 1239 public Scene(RegionInfo regInfo)