From 8e04c752fc2bc1f27fce224d2aec3ea72edbc2cc Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 9 Apr 2013 22:38:47 +0100 Subject: [PATCH] If OpenSimulator is writing a PID file and finds the file already present on startup, logging an error since this is commonly due to an unclean shutdown. Unclean shutdown can cause constantly moving objects to disappear if an OAR has just been loaded and they have not reached persistence time threshold, among other problems. --- OpenSim/Framework/Servers/ServerBase.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OpenSim/Framework/Servers/ServerBase.cs b/OpenSim/Framework/Servers/ServerBase.cs index 657444ca60..2c4a687237 100644 --- a/OpenSim/Framework/Servers/ServerBase.cs +++ b/OpenSim/Framework/Servers/ServerBase.cs @@ -76,6 +76,11 @@ namespace OpenSim.Framework.Servers protected void CreatePIDFile(string path) { + if (File.Exists(path)) + m_log.ErrorFormat( + "[SERVER BASE]: Previous pid file {0} still exists on startup. Possibly previously unclean shutdown.", + path); + try { string pidstring = System.Diagnostics.Process.GetCurrentProcess().Id.ToString();