Bug 44328 - MainModule.FileVersionInfo.FileName reports different paths based on lookup timing
Summary: MainModule.FileVersionInfo.FileName reports different paths based on lookup t...
Status: NEW
Alias: None
Product: Runtime
Classification: Mono
Component: io-layer (show other bugs)
Version: 4.4.2 (C7SR1)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-09-14 21:10 UTC by christopher dieringer
Modified: 2016-09-16 13:53 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 44328 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description christopher dieringer 2016-09-14 21:10:35 UTC
hello:

if I run a child process and grab the FileName for it, depending on _when_ I ask for the FileName, I am subject to get different results.

Here's a snapshot of a very basic repo where one can replicate the issue: https://gitlab.com/cdaringe/csharp-manage-child-process-demo/tree/8b605cef1d74fa38c04f7c6ea216f842848717de

To reproduce:

- follow the readme instructions (very basic!)
- install the c# project's packages (just json.net)
- run the app.  at this point https://gitlab.com/cdaringe/csharp-manage-child-process-demo/blob/8b605cef1d74fa38c04f7c6ea216f842848717de/ChildProcessHandles/Program.cs#L120 if you are running on OSX you will observe the that filename == '/usr/bin/env'.
  - this is _not_ the binary that was called
- stop execution
- uncomment the following and rebuild: https://gitlab.com/cdaringe/csharp-manage-child-process-demo/blob/8b605cef1d74fa38c04f7c6ea216f842848717de/ChildProcessHandles/Program.cs#L77
- at the previous point of error, the filename is now correctly `/some/path/node`, per expectation

thanks!

OS: mac osx 10.11
mono: Mono JIT compiler version 4.4.2 (mono-4.4.0-branch-c7sr1/f72fe45 Wed Jul 27 16:20:13 EDT 2016)
Comment 1 christopher dieringer 2016-09-14 21:53:11 UTC
on windows, using .net proper, it also actually reports out cmd.exe in _both_ scenarios.  not sure what to pick to reliably get the path to the running binary and the args it was provided, if they are even available. :/