Applying a modified version of TomTheDragon's patch to prevent the sim

from crashing when signals are unavailable.
melanie
Melanie Thielker 2016-12-12 09:26:12 +00:00
parent da2c1e8aad
commit cdfdf6322d
1 changed files with 14 additions and 7 deletions

View File

@ -131,7 +131,6 @@ namespace OpenSim
private Thread signal_thread = new Thread (delegate () private Thread signal_thread = new Thread (delegate ()
{ {
System.Console.WriteLine("------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------");
while (true) while (true)
{ {
// Wait for a signal to be delivered // Wait for a signal to be delivered
@ -153,13 +152,21 @@ namespace OpenSim
if(!Util.IsWindows()) if(!Util.IsWindows())
{ {
// linux mac os specifics try
signals = new Mono.Unix.UnixSignal[]
{ {
// new Mono.Unix.UnixSignal(Mono.Unix.Native.Signum.SIGINT), // linux mac os specifics
new Mono.Unix.UnixSignal(Mono.Unix.Native.Signum.SIGTERM) signals = new Mono.Unix.UnixSignal[]
}; {
signal_thread.Start(); new Mono.Unix.UnixSignal(Mono.Unix.Native.Signum.SIGTERM)
};
signal_thread.Start();
}
catch (Exception e)
{
m_log.Info("Could not set up UNIX signal handlers. SIGTERM will not");
m_log.InfoFormat("shut down gracefully: {0}", e.Message);
m_log.Debug("Exception was: ", e);
}
} }
//m_log.InfoFormat("[OPENSIM MAIN]: GC Is Server GC: {0}", GCSettings.IsServerGC.ToString()); //m_log.InfoFormat("[OPENSIM MAIN]: GC Is Server GC: {0}", GCSettings.IsServerGC.ToString());
// http://msdn.microsoft.com/en-us/library/bb384202.aspx // http://msdn.microsoft.com/en-us/library/bb384202.aspx