Skip to content

console redirection is broken #8364

@Spongman

Description

@Spongman
using System;
class Test {
  public static void Main () {
    while(true)
      Console.WriteLine(Console.ReadLine());
  }
}

stdout redirection:

test command: dotnet run > test.txt
expected behavior is to show typed text in the console/tty, and to write the typed lines out to test.txt

on windows: works fine.
on linux: writes stdin to the file ok, but the typed text is not echoed to tty.

stdin redirection:

test command: dotnet run < test.txt (test.txt exists and contains some lines of text)
expected behavior is to write the contents of test.txt to the console/tty.

on both windows & linux: console clears and the CPU is pegged!!

version: 1.0.4

Microsoft .NET Core Shared Framework Host

  Version  : 1.1.0
  Build    : 928f77c4bc3f49d892459992fb6e1d5542cb5e86

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions