aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Base/ServicesServerBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Server/Base/ServicesServerBase.cs')
-rw-r--r--OpenSim/Server/Base/ServicesServerBase.cs25
1 files changed, 3 insertions, 22 deletions
diff --git a/OpenSim/Server/Base/ServicesServerBase.cs b/OpenSim/Server/Base/ServicesServerBase.cs
index 4eed7d5..ade4bab 100644
--- a/OpenSim/Server/Base/ServicesServerBase.cs
+++ b/OpenSim/Server/Base/ServicesServerBase.cs
@@ -69,10 +69,6 @@ namespace OpenSim.Server.Base
69 // 69 //
70 private bool m_Running = true; 70 private bool m_Running = true;
71 71
72 // PID file
73 //
74 private string m_pidFile = String.Empty;
75
76 // Handle all the automagical stuff 72 // Handle all the automagical stuff
77 // 73 //
78 public ServicesServerBase(string prompt, string[] args) : base() 74 public ServicesServerBase(string prompt, string[] args) : base()
@@ -240,8 +236,8 @@ namespace OpenSim.Server.Base
240 } 236 }
241 } 237 }
242 238
243 if (m_pidFile != String.Empty) 239 RemovePIDFile();
244 File.Delete(m_pidFile); 240
245 return 0; 241 return 0;
246 } 242 }
247 243
@@ -249,6 +245,7 @@ namespace OpenSim.Server.Base
249 { 245 {
250 m_Running = false; 246 m_Running = false;
251 m_log.Info("[CONSOLE] Quitting"); 247 m_log.Info("[CONSOLE] Quitting");
248
252 } 249 }
253 250
254 protected virtual void HandleScript(string module, string[] parms) 251 protected virtual void HandleScript(string module, string[] parms)
@@ -292,21 +289,5 @@ namespace OpenSim.Server.Base
292 protected virtual void Initialise() 289 protected virtual void Initialise()
293 { 290 {
294 } 291 }
295
296 protected void CreatePIDFile(string path)
297 {
298 try
299 {
300 string pidstring = System.Diagnostics.Process.GetCurrentProcess().Id.ToString();
301 FileStream fs = File.Create(path);
302 Byte[] buf = Encoding.ASCII.GetBytes(pidstring);
303 fs.Write(buf, 0, buf.Length);
304 fs.Close();
305 m_pidFile = path;
306 }
307 catch (Exception)
308 {
309 }
310 }
311 } 292 }
312} \ No newline at end of file 293} \ No newline at end of file