https://bugzilla.novell.com/show_bug.cgi?id=661922
https://bugzilla.novell.com/show_bug.cgi?id=661922#c0 Summary: Console.ReadKey and ReadLine not working on linux Mono. Classification: Mono Product: Mono: Class Libraries Version: 2.8.x Platform: i686 OS/Version: Linux Status: NEW Severity: Major Priority: P5 - None Component: System AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- Description of Problem: Console.ReadKey() is not blocking and returning 0 even if key is pressed. Steps to reproduce the problem: 1. Console.WriteLine("Press ESCAPE to exit the main server thread..."); ConsoleKeyInfo ki; while ((ki = Console.ReadKey(true)).Key != ConsoleKey.Escape) { if (ki.KeyChar == 0) { Thread.Sleep(500); Console.WriteLine("Ignoring " + (int)ki.KeyChar + ", " + ki.Key.ToString()); continue; } Console.WriteLine("Got a " + (int)ki.KeyChar); } Console.WriteLine("Main thread exiting..."); Actual Results: Console only shows "Ignoring 0 0" every over and over (ReadKey doesn't block). If I press keys they are echoed to console but I do not see the "Got a" message. Same code works on Windows under Mono 2.8.1. . ReadLine() also is not working but I assume it is related. Expected Results: ReadKey blocks until a key is pressed and then return keys value. How often does this happen? Everytime. Additional Information: Found on Mono 2.8.1 on linux CentOs 5.4 (close to Red Hat). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
