Skip to content

Commit e0f8fa9

Browse files
committed
Remove Mono.Posix as it doesn't work on Windows
1 parent 3b744a9 commit e0f8fa9

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

src/InEngine/InEngine.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
<ItemGroup>
3030
<Reference Include="System.ServiceProcess" />
3131
<Reference Include="System.Configuration.Install" />
32-
<Reference Include="Mono.Posix" />
3332
</ItemGroup>
3433
<ItemGroup>
3534
<None Update="Install.ps1">

src/InEngine/Program.cs

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
using System.IO;
33
using System.ServiceProcess;
44
using InEngine.Core;
5-
using Mono.Unix;
6-
using Mono.Unix.Native;
5+
//using Mono.Unix;
6+
//using Mono.Unix.Native;
77

88
namespace InEngine
99
{
@@ -32,26 +32,16 @@ public static void RunServer()
3232
MailSettings = settings.Mail,
3333
QueueSettings = settings.Queue,
3434
};
35-
if (Type.GetType("Mono.Runtime") != null) {
36-
ServerHost.Start();
37-
Console.WriteLine("CTRL+C to exit.");
38-
UnixSignal.WaitAny(new[] {
39-
new UnixSignal(Signum.SIGINT),
40-
new UnixSignal(Signum.SIGTERM),
41-
new UnixSignal(Signum.SIGQUIT),
42-
new UnixSignal(Signum.SIGHUP)
43-
});
44-
ServerHost.Dispose();
45-
}
46-
else if (!Environment.UserInteractive)
35+
36+
if (!Environment.UserInteractive && Type.GetType("Mono.Runtime") == null)
4737
{
4838
using (var service = new Service())
4939
ServiceBase.Run(service);
5040
}
5141
else
5242
{
5343
ServerHost.Start();
54-
Console.WriteLine("Any key to exit...");
44+
Console.WriteLine("Press any key to exit...");
5545
Console.ReadLine();
5646
ServerHost.Dispose();
5747
}

0 commit comments

Comments
 (0)