Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP4:RebuildFactoryUpdates
xsp
asp-state4-signals.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File asp-state4-signals.patch of Package xsp
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(); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor