diff --git a/OpenSim/Framework/Servers/ServerBase.cs b/OpenSim/Framework/Servers/ServerBase.cs index 87eeb136b0..60a99890d5 100755 --- a/OpenSim/Framework/Servers/ServerBase.cs +++ b/OpenSim/Framework/Servers/ServerBase.cs @@ -86,7 +86,7 @@ namespace OpenSim.Framework.Servers try { - string pidstring = System.Diagnostics.Process.GetCurrentProcess().Id.ToString(); + string pidstring = Environment.ProcessId.ToString(); using (FileStream fs = File.Create(path)) { diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index ae38fb644e..17b9cee2a9 100755 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -226,11 +226,11 @@ namespace OpenSim throw new Exception("CombineContiguousRegions not suported"); } - string pidFile = startupConfig.GetString("PIDFile", String.Empty); - if (pidFile != String.Empty) + string pidFile = startupConfig.GetString("PIDFile", string.Empty); + if (pidFile.Length > 0) CreatePIDFile(pidFile); - userStatsURI = startupConfig.GetString("Stats_URI", String.Empty); + userStatsURI = startupConfig.GetString("Stats_URI", string.Empty); m_securePermissionsLoading = startupConfig.GetBoolean("SecurePermissionsLoading", true); @@ -355,7 +355,7 @@ namespace OpenSim // Sure is not the right place for this but do the job... // Must always be called before (all) / the HTTP servers starting for the Certs creation or renewals. - if(startupConfig.GetBoolean("EnableSelfsignedCertSupport", false)) + if (startupConfig.GetBoolean("EnableSelfsignedCertSupport", false)) { if(!File.Exists("SSL\\ssl\\"+ startupConfig.GetString("CertFileName") +".p12") || startupConfig.GetBoolean("CertRenewOnStartup")) { diff --git a/OpenSim/Server/Base/ServicesServerBase.cs b/OpenSim/Server/Base/ServicesServerBase.cs index 368dc36660..152018e6d5 100755 --- a/OpenSim/Server/Base/ServicesServerBase.cs +++ b/OpenSim/Server/Base/ServicesServerBase.cs @@ -180,9 +180,10 @@ namespace OpenSim.Server.Base RegisterCommonAppenders(startupConfig); LogEnvironmentInformation(); - if (startupConfig.GetString("PIDFile", String.Empty) != String.Empty) + string pidfile = startupConfig.GetString("PIDFile", string.Empty); + if (pidfile.Length > 0) { - CreatePIDFile(startupConfig.GetString("PIDFile")); + CreatePIDFile(pidfile); } RegisterCommonCommands();