You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
~ $ cat t.cs
using System;
public class Test {
static int Main(string[] args) {
Console.Write("Type some characters: ");
string s = Console.ReadLine();
return 0;
}
}
~ $ mcs t.cs
t.cs(8,12): warning CS0219: The variable `s' is assigned but its value is never used
Compilation succeeded - 1 warning(s)
~ $ mono t.exe
Type some characters: kdkd kdkd
~ $
No command lskw found, did you mean:
Command ls in package coreutils
Command lsb in package lrzsz
Command lsd in package lsd
Command lsix in package lsix
Command lsof in package lsof
Command lsrc in package rcm
Command lsar in package unar
Command lsfd in package util-linux
~ $
No command nn found, did you mean:
Command nm in package binutils
Command nm in package binutils-is-llvm
Command ln in package coreutils
Command gn in package gn
Command sn in package mono
Command ne in package ne
Command nc in package netcat-openbsd
Command nnn in package nnn
Command nu in package nushell
Command nx in package nxengine
Command nns in package tcllib
Command sn in package tin-summer
~ $
Erase is delete.
Interrupt is control-C (^C).
~ $ mono t.exe | cat
Type some characters: hi
~ $ echo test
test
~ $
Current Behavior
After a C# program exit with calls to Console.ReadLine(), console now fails to echo characters. (The console's echoing can be restored with reset.)
One temporary remedy is to redirect to stdout to /dev/null or pipe it cat.
Expected Behavior
Console get's restored to it's echoing state
On which platforms did you notice this
macOS
Linux
Windows
Android (Termux)
Version Used: 6.12.0.199
Strace
I suspect it's has something to do with termios (which eventually calls ioctl). Redirecting
stdout to somewhere prevents corrupting the console of which the ioctl error as:
Steps to Reproduce
Current Behavior
After a C# program exit with calls to Console.ReadLine(), console now fails to echo characters. (The console's echoing can be restored with reset.)
One temporary remedy is to redirect to stdout to /dev/null or pipe it cat.
Expected Behavior
Console get's restored to it's echoing state
On which platforms did you notice this
Version Used: 6.12.0.199
Strace
I suspect it's has something to do with termios (which eventually calls ioctl). Redirecting
stdout to somewhere prevents corrupting the console of which the ioctl error as:
The console get's corrupted with the following ioctl calls (assuming it's the root problem):
The text was updated successfully, but these errors were encountered: