[Mono-bugs] [Bug 360348] New: ProcessName results in SystemException for forked process
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sat Feb 9 08:55:20 EST 2008
https://bugzilla.novell.com/show_bug.cgi?id=360348
Summary: ProcessName results in SystemException for forked
process
Product: Mono: Runtime
Version: SVN
Platform: All
OS/Version: Ubuntu
Status: NEW
Severity: Normal
Priority: P5 - None
Component: misc
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: gert.driesen at pandora.be
QAContact: mono-bugs at lists.ximian.com
Found By: ---
When a managed process is launched from another a managed app, then calling
Process.GetCurrentProcess ().ProcessName in the "forked" process results in the
following exception:
Unhandled Exception: System.SystemException: The process has exited
at System.Diagnostics.Process.get_ProcessName () [0x00000]
at (wrapper remoting-invoke-with-check)
System.Diagnostics.Process:get_ProcessName ()
at Program.Main (System.String[] args) [0x00000]
To reproduce, compile and run the following code:
using System;
using System.Diagnostics;
using System.Threading;
class Program
{
static void Main (string [] args)
{
if (args.Length == 0) {
Process p = new Process ();
p.StartInfo.FileName = "mono";
p.StartInfo.Arguments = "test.exe whatever";
p.Start ();
p.WaitForExit ();
} else {
Console.WriteLine (Process.GetCurrentProcess ().ProcessName);
}
}
}
Note:
The same code works fine on Mono/Windows.
--
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.
More information about the mono-bugs
mailing list