[Mono-bugs] [Bug 65495][Maj] New - System.Diagnostics.Process.MainModule always lists the Mono process only and does not list all processes
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Tue, 7 Sep 2004 19:50:31 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by ankur.kotwal@gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=65495
--- shadow/65495 2004-09-07 19:50:31.000000000 -0400
+++ shadow/65495.tmp.14993 2004-09-07 19:50:31.000000000 -0400
@@ -0,0 +1,132 @@
+Bug#: 65495
+Product: Mono: Class Libraries
+Version: unspecified
+OS:
+OS Details: Windows 2000, Windows XP SP1
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: System
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: ankur.kotwal@gmail.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: System.Diagnostics.Process.MainModule always lists the Mono process only and does not list all processes
+
+Description of Problem:
+The output of the program below is to list the process name and its full
+path. When I run the application using MS .NET, the program works as
+expected. When I run it under mono however, the program lists the
+process names correctly but the process path is always the name of my
+program (i.e. it displays D:\scratch\bug.exe as the process path for all
+listed processes). It also does not list all processes on my system. Thus,
+there are really two (possibly separate) bugs here.
+
+Steps to reproduce the problem:
+Compile and run the following code on a Windows machine:
+--- Start Code
+using System;
+using System.Diagnostics;
+
+class ProcessPathList
+{
+ public static void Main(string[] args)
+ {
+ foreach(Process process in Process.GetProcesses())
+ {
+ if(process.ProcessName == @"System" || process.ProcessName == @"Idle")
+ continue;
+ Console.WriteLine("{0,-15} {1}", process.ProcessName,
+process.MainModule.FileName);
+ }
+ }
+}
+--- End Code
+
+Actual Results:
+D:\scratch>mono bug.exe
+Explorer.EXE D:\scratch\bug.exe
+point32 D:\scratch\bug.exe
+UpdaterUI D:\scratch\bug.exe
+SHSTAT.EXE D:\scratch\bug.exe
+MsgPlus D:\scratch\bug.exe
+RICOlmer D:\scratch\bug.exe
+taskmgr D:\scratch\bug.exe
+trayit! D:\scratch\bug.exe
+MAPISP32.EXE D:\scratch\bug.exe
+OUTLOOK.EXE D:\scratch\bug.exe
+winamp D:\scratch\bug.exe
+SSEXP.EXE D:\scratch\bug.exe
+cmd D:\scratch\bug.exe
+xplorer2 D:\scratch\bug.exe
+MSDEV.EXE D:\scratch\bug.exe
+putty D:\scratch\bug.exe
+putty D:\scratch\bug.exe
+gnotify D:\scratch\bug.exe
+WINWORD.EXE D:\scratch\bug.exe
+gvim D:\scratch\bug.exe
+gvim D:\scratch\bug.exe
+irgui D:\scratch\bug.exe
+firefox D:\scratch\bug.exe
+msnmsgr D:\scratch\bug.exe
+gvim D:\scratch\bug.exe
+cmd D:\scratch\bug.exe
+mono D:\scratch\bug.exe
+
+Expected Results:
+D:\scratch>bug.exe
+gnotify C:\Program Files\Google\Gmail Notifier\gnotify.exe
+putty D:\Downloads\putty.exe
+svchost C:\WINNT\system32\svchost.exe
+OUTLOOK C:\Program Files\Microsoft Office\Office\OUTLOOK.EXE
+gvim C:\vim\gvim.exe
+svchost C:\WINNT\System32\svchost.exe
+xplorer2 C:\Program Files\xplorer2\xplorer2.exe
+WINLOGON \??\C:\WINNT\system32\winlogon.exe
+bug D:\scratch\bug.exe
+CMD C:\WINNT\system32\cmd.exe
+RICOlmer C:\Program Files\RICOlmer\RICOlmer.exe
+svchost C:\WINNT\system32\svchost.exe
+svchost C:\WINNT\System32\svchost.exe
+gvim C:\vim\gvim.exe
+VsTskMgr C:\Program Files\Network Associates\VirusScan\VsTskMgr.exe
+cisvc C:\WINNT\System32\cisvc.exe
+winvnc C:\Program Files\UltraVNC\WinVNC.exe
+CSRSS \??\C:\WINNT\system32\csrss.exe
+shstat C:\Program Files\Network Associates\VirusScan\SHSTAT.EXE
+cidaemon C:\WINNT\System32\cidaemon.exe
+MAPISP32 C:\Program Files\Common Files\System\MAPI\1033\nt\MAPISP32.EXE
+Mcshield C:\Program Files\Network Associates\VirusScan\Mcshield.exe
+mstask C:\WINNT\system32\MSTask.exe
+SMSS C:\WINNT\system32\smss.exe
+point32 C:\Program Files\Microsoft Hardware\Mouse\point32.exe
+gvim C:\vim\gvim.exe
+trayit! C:\Program Files\TrayIt\trayit!.exe
+WinMgmt C:\WINNT\System32\WBEM\WinMgmt.exe
+LSASS C:\WINNT\system32\lsass.exe
+CMD C:\WINNT\system32\cmd.exe
+explorer C:\WINNT\Explorer.EXE
+naPrdMgr C:\PROGRA~1\NETWOR~1\COMMON~1\naPrdMgr.exe
+SSEXP C:\Program Files\Microsoft Visual Studio\VSS\win32\SSEXP.EXE
+UpdaterUI C:\Program Files\Network Associates\Common
+Framework\UpdaterUI.exe
+winamp C:\Program Files\Winamp\winamp.exe
+firefox C:\Program Files\Mozilla Firefox\firefox.exe
+spoolsv C:\WINNT\system32\spoolsv.exe
+putty D:\Downloads\putty.exe
+MSDEV C:\Program Files\Microsoft Visual
+Studio\Common\MSDev98\Bin\MSDEV.EXE
+TASKMGR C:\WINNT\system32\taskmgr.exe
+SERVICES C:\WINNT\system32\services.exe
+WINWORD C:\Program Files\Microsoft Office\Office\WINWORD.EXE
+FrameworkService C:\Program Files\Network Associates\Common
+Framework\FrameworkService.exe
+
+How often does this happen?
+Every single time.
+
+Additional Information:
+I am using Mono 1.0.1.