- update version 4.7.1 * drop .NET 2.0 support * add Mono.WebServer.Fpm OBS-URL: https://build.opensuse.org/request/show/781241 OBS-URL: https://build.opensuse.org/package/show/Mono:Factory/xsp?expand=0&rev=58
48 lines
1.5 KiB
Diff
48 lines
1.5 KiB
Diff
Index: xsp-4.7.1/tools/asp_state/Makefile.am
|
|
===================================================================
|
|
--- xsp-4.7.1.orig/tools/asp_state/Makefile.am
|
|
+++ xsp-4.7.1/tools/asp_state/Makefile.am
|
|
@@ -1,4 +1,4 @@
|
|
-MCSFLAGS= -debug+ -debug:full -nologo
|
|
+MCSFLAGS= -debug+ -debug:full -nologo -r:Mono.Posix.dll
|
|
|
|
scripts4 = asp-state4.exe
|
|
data4 = asp-state4.exe.config
|
|
Index: xsp-4.7.1/tools/asp_state/asp_state.cs
|
|
===================================================================
|
|
--- xsp-4.7.1.orig/tools/asp_state/asp_state.cs
|
|
+++ xsp-4.7.1/tools/asp_state/asp_state.cs
|
|
@@ -11,6 +11,8 @@ using System;
|
|
using System.IO;
|
|
using System.Reflection;
|
|
using System.Runtime.Remoting;
|
|
+using Mono.Unix;
|
|
+using Mono.Unix.Native;
|
|
|
|
namespace Mono.ASPNET.Tools {
|
|
|
|
@@ -64,10 +66,21 @@ and works until <Enter> is pressed.
|
|
public static void Main (string [] args)
|
|
{
|
|
if (args.Length == 0) {
|
|
+ UnixSignal [] signals = new UnixSignal[] {
|
|
+ new UnixSignal(Signum.SIGINT),
|
|
+ new UnixSignal(Signum.SIGTERM),
|
|
+ };
|
|
RemotingConfiguration.Configure (ConfigurationFileName, false);
|
|
ShowVerboseConfigurationInfo(ConfigurationFileName);
|
|
- Console.Write("Press <Enter> to stop...");
|
|
- Console.ReadLine ();
|
|
+ // Wait for a unix signal to exit
|
|
+ for (bool exit = false; !exit; )
|
|
+ {
|
|
+ int id = UnixSignal.WaitAny(signals);
|
|
+ if (id >= 0 && id < signals.Length)
|
|
+ {
|
|
+ if (signals[id].IsSet) exit = true;
|
|
+ }
|
|
+ }
|
|
} else {
|
|
ShowUsage();
|
|
}
|