[Mono-bugs] [Bug 357062] New: System.Diagnostics.Process.GetCurrentProcess().MainModule .FileName does not return the full path.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Jan 29 15:28:44 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=357062


           Summary: System.Diagnostics.Process.GetCurrentProcess().MainModul
                    e.FileName does not return the full path.
           Product: Mono: Runtime
           Version: SVN
          Platform: i386
        OS/Version: RHEL 4
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: io-layer
        AssignedTo: dick at novell.com
        ReportedBy: billholmes54 at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Third Party Developer/Partner


Created an attachment (id=192216)
 --> (https://bugzilla.novell.com/attachment.cgi?id=192216)
test.cs  Sample to reproduce

Steps to reproduce:
Compile and run the attached test.cs

Expected output:
(Something like)
/home/wfh/dev/mono/bugs/GetCurrentProcess/test.exe

Actual output:
test.exe

This is a regression form 1.2.6.

I have tracked this down to methods EnumProcessModules and GetModuleFileNameEx
in io-layer/processes.c.  Ultimately the problem is that the process name is
stored without the path.  If a way can be found such that EnumProcessModules
does not put NULL in the first module entry but instead finds the correct entry
in the /proc/<PID>/maps file, that would fix the problem.


-- 
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