https://bugzilla.novell.com/show_bug.cgi?id=649543
https://bugzilla.novell.com/show_bug.cgi?id=649543#c0 Summary: ConsoleDriver.TtySetup() fails if mono is started from Process.Start() Classification: Mono Product: Mono: Class Libraries Version: 2.8.x Platform: x86 OS/Version: Ubuntu Status: NEW Severity: Normal Priority: P5 - None Component: System AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11 ConsoleDriver.TtySetup(), called from TermInfoDriver.Init(), fails if mono was started with Process.Start(). This method is invoked by many of Console's properties, such as BackgroundColor, ForegroundColor, and Title. The attached test case simply sets Console.Title and Console.BackgroundColor, then prints a line of text. It runs normally when started directly. However, it fails (at ConsoleDriver.TtySetup()) if Mono was started with Process.Start() from another assembly. This is reproducible regardless of UseShellExecute parameter. Similar test case for .NET (with FileName="mono" replaced with executable's actual name) produces expected behavior. Reproducible: Always Steps to Reproduce: r...@li222-193:~# cat ConsoleTest.cs using System; class Program { static void Main( string[] args ) { Console.Title = "Foo"; Console.BackgroundColor = ConsoleColor.Red; Console.WriteLine( "ConsoleTest" ); } } r...@li222-193:~# gmcs ConsoleTest.cs r...@li222-193:~# mono ConsoleTest.exe ConsoleTest r...@li222-193:~# cat ConsoleTestLauncher.cs using System; using System.Diagnostics; class Program { static void Main( string[] args ) { Process.Start( new ProcessStartInfo { FileName = "mono", Arguments = "ConsoleTest.exe", UseShellExecute = false } ); } } r...@li222-193:~# gmcs ConsoleTestLauncher.cs r...@li222-193:~# mono ConsoleTestLauncher.exe r...@li222-193:~# Unhandled Exception: System.IO.IOException: Error initializing terminal. at System.TermInfoDriver.Init () [0x00000] in <filename unknown>:0 at System.TermInfoDriver.set_Title (System.String value) [0x00000] in <filename unknown>:0 at System.ConsoleDriver.set_Title (System.String value) [0x00000] in <filename unknown>:0 at System.Console.set_Title (System.String value) [0x00000] in <filename unknown>:0 at Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 r...@li222-193:~# cat ConsoleTestLauncherShell.cs using System; using System.Diagnostics; class Program { static void Main( string[] args ) { Process.Start( new ProcessStartInfo { FileName = "mono", Arguments = "ConsoleTest.exe", UseShellExecute = true } ); } } r...@li222-193:~# gmcs ConsoleTestLauncherShell.cs r...@li222-193:~# mono ConsoleTestLauncherShell.exe r...@li222-193:~# Unhandled Exception: System.IO.IOException: Error initializing terminal. at System.TermInfoDriver.Init () [0x00000] in <filename unknown>:0 at System.TermInfoDriver.set_Title (System.String value) [0x00000] in <filename unknown>:0 at System.ConsoleDriver.set_Title (System.String value) [0x00000] in <filename unknown>:0 at System.Console.set_Title (System.String value) [0x00000] in <filename unknown>:0 at Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 Actual Results: Console's properties are unusable. Expected Results: Console's properties work normally. Using mono 2.8 (compiled from source), fresh Ubuntu 10.04.1 LTS, bash shell, running as root. Detailed mono information below: Mono JIT compiler version 2.8 (tarball Wed Oct 27 09:22:27 UTC 2010) Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com TLS: __thread SIGSEGV: altstack Notifications: epoll Architecture: x86 Disabled: none Misc: debugger softdebug LLVM: supported, not enabled. GC: Included Boehm (with typed GC and Parallel Mark) -- 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
