Hello community, here is the log from the commit of package xsp for openSUSE:Factory checked in at 2019-05-13 14:52:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xsp (Old) and /work/SRC/openSUSE:Factory/.xsp.new.5148 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xsp" Mon May 13 14:52:29 2019 rev:50 rq:702494 version:3.0.11 Changes: -------- --- /work/SRC/openSUSE:Factory/xsp/xsp.changes 2019-03-18 10:43:19.299148391 +0100 +++ /work/SRC/openSUSE:Factory/.xsp.new.5148/xsp.changes 2019-05-13 14:52:30.915087222 +0200 @@ -1,0 +2,6 @@ +Sun May 12 07:52:43 UTC 2019 - Martin Liška <[email protected]> + +- Add asp-state4-signals.patch in order to fix + https://bugzilla.xamarin.com/show_bug.cgi?id=7838. + +------------------------------------------------------------------- New: ---- asp-state4-signals.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xsp.spec ++++++ --- /var/tmp/diff_new_pack.vSzWi4/_old 2019-05-13 14:52:31.479088642 +0200 +++ /var/tmp/diff_new_pack.vSzWi4/_new 2019-05-13 14:52:31.483088652 +0200 @@ -34,6 +34,7 @@ Patch2: mono-440-build-fix.patch Patch3: mono-4-install.patch Patch4: xsp-add-systemd-support.patch +Patch5: asp-state4-signals.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch BuildRequires: autoconf @@ -85,6 +86,7 @@ %patch3 -p1 %endif %patch4 -p1 +%patch5 -p1 %build NOCONFIGURE=1 ./autogen.sh ++++++ asp-state4-signals.patch ++++++ diff --git a/tools/asp_state/Makefile.am b/tools/asp_state/Makefile.am index ea56700..1166c27 100644 --- a/tools/asp_state/Makefile.am +++ b/tools/asp_state/Makefile.am @@ -1,4 +1,4 @@ -MCSFLAGS= -debug+ -debug:full -nologo +MCSFLAGS= -debug+ -debug:full -nologo -r:Mono.Posix.dll scripts2 = asp-state2.exe data2 = asp-state2.exe.config diff --git a/tools/asp_state/asp_state.cs b/tools/asp_state/asp_state.cs index 8ba8b62..0157ff5 100644 --- a/tools/asp_state/asp_state.cs +++ b/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,22 @@ 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(); }
