diff options
author | Melanie Thielker | 2016-12-12 09:26:12 +0000 |
---|---|---|
committer | Melanie Thielker | 2016-12-12 09:26:12 +0000 |
commit | cdfdf6322defc614a1261a38c710bf3f73cd4dc7 (patch) | |
tree | 1a8a82c9753b1c276d4adadbf6a0da4d2545b3ce /OpenSim/Region/Application | |
parent | don't do unix signals on windows (diff) | |
download | opensim-SC_OLD-cdfdf6322defc614a1261a38c710bf3f73cd4dc7.zip opensim-SC_OLD-cdfdf6322defc614a1261a38c710bf3f73cd4dc7.tar.gz opensim-SC_OLD-cdfdf6322defc614a1261a38c710bf3f73cd4dc7.tar.bz2 opensim-SC_OLD-cdfdf6322defc614a1261a38c710bf3f73cd4dc7.tar.xz |
Applying a modified version of TomTheDragon's patch to prevent the sim
from crashing when signals are unavailable.
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index aba09e0..3cb999b 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -131,7 +131,6 @@ namespace OpenSim | |||
131 | 131 | ||
132 | private Thread signal_thread = new Thread (delegate () | 132 | private Thread signal_thread = new Thread (delegate () |
133 | { | 133 | { |
134 | System.Console.WriteLine("------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"); | ||
135 | while (true) | 134 | while (true) |
136 | { | 135 | { |
137 | // Wait for a signal to be delivered | 136 | // Wait for a signal to be delivered |
@@ -153,13 +152,21 @@ namespace OpenSim | |||
153 | 152 | ||
154 | if(!Util.IsWindows()) | 153 | if(!Util.IsWindows()) |
155 | { | 154 | { |
156 | // linux mac os specifics | 155 | try |
157 | signals = new Mono.Unix.UnixSignal[] | ||
158 | { | 156 | { |
159 | // new Mono.Unix.UnixSignal(Mono.Unix.Native.Signum.SIGINT), | 157 | // linux mac os specifics |
160 | new Mono.Unix.UnixSignal(Mono.Unix.Native.Signum.SIGTERM) | 158 | signals = new Mono.Unix.UnixSignal[] |
161 | }; | 159 | { |
162 | signal_thread.Start(); | 160 | new Mono.Unix.UnixSignal(Mono.Unix.Native.Signum.SIGTERM) |
161 | }; | ||
162 | signal_thread.Start(); | ||
163 | } | ||
164 | catch (Exception e) | ||
165 | { | ||
166 | m_log.Info("Could not set up UNIX signal handlers. SIGTERM will not"); | ||
167 | m_log.InfoFormat("shut down gracefully: {0}", e.Message); | ||
168 | m_log.Debug("Exception was: ", e); | ||
169 | } | ||
163 | } | 170 | } |
164 | //m_log.InfoFormat("[OPENSIM MAIN]: GC Is Server GC: {0}", GCSettings.IsServerGC.ToString()); | 171 | //m_log.InfoFormat("[OPENSIM MAIN]: GC Is Server GC: {0}", GCSettings.IsServerGC.ToString()); |
165 | // http://msdn.microsoft.com/en-us/library/bb384202.aspx | 172 | // http://msdn.microsoft.com/en-us/library/bb384202.aspx |