[Mono-bugs] [Bug 431022] New: Process.StandardInput.Write error
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Sep 30 15:08:41 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=431022
Summary: Process.StandardInput.Write error
Product: Mono: Runtime
Version: 1.9
Platform: Other
OS/Version: Ubuntu
Status: NEW
Severity: Major
Priority: P5 - None
Component: JIT
AssignedTo: lupus at novell.com
ReportedBy: matt.mcaughan at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: Community User
Created an attachment (id=242636)
--> (https://bugzilla.novell.com/attachment.cgi?id=242636)
demo code to reproduce the error
When executing an external process with the System.Diagnostic.Process class
under Ubuntu 8.04.1 the write method fails with:
Unhandled Exception: System.IO.IOException: Write fault on path [Unknown]
at System.IO.FileStream.FlushBuffer () [0x00000]
at System.IO.FileStream.Flush () [0x00000]
at System.IO.StreamWriter.Flush () [0x00000]
at System.IO.StreamWriter.Write (System.String value) [0x00000]
at Demo.Main (System.String[] args) [0x00000]
This happened with the pre-packaged version of mono installed with apt-get and
well as a self compiled version using the mono-1.9.1 tar ball.
Identical code works fine under Ubuntu 7.10 and Visual Studio. See attachment
for sample code (shown here as well).
using System;
using System.Diagnostics;
class Demo {
static Process p;
public static void Main(string[] args) {
ProcessStartInfo psi = new ProcessStartInfo("ls", "./");
psi.UseShellExecute = false;
psi.RedirectStandardOutput = true;
psi.RedirectStandardInput = true;
p = Process.Start(psi);
p.StandardInput.Write("Hello");
p.StandardInput.Close();
p.WaitForExit();
string output = p.StandardOutput.ReadToEnd();
System.Console.WriteLine(output);
}
}
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list