Skip to content

console redirection is broken #22314

Description

@jkotas

From @Spongman on June 15, 2017 21:5

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

Copied from original issue: dotnet/coreclr#12308

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions