mirror of
https://github.com/livingcomputermuseum/IFS.git
synced 2026-02-03 07:20:30 +00:00
Merge pull request #2 from shirriff/bugfix
Don't use console if redirected.
This commit is contained in:
@@ -19,7 +19,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
|
||||
namespace IFS.IfsConsole
|
||||
{
|
||||
@@ -162,6 +162,13 @@ namespace IFS.IfsConsole
|
||||
|
||||
public void Run()
|
||||
{
|
||||
if (Console.IsOutputRedirected || Console.IsInputRedirected)
|
||||
{
|
||||
// No console, so just run forever.
|
||||
Thread.Sleep(Timeout.Infinite);
|
||||
return;
|
||||
}
|
||||
|
||||
bool exit = false;
|
||||
while (!exit)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user