[process] Fix Process.GetProcessesByName (#4351)
To get a process by name, we need to access the other process ProcessName, but it can fails on non-win32 platforms. This failure wouldn't be caught in the referencesource implementation trigerring this bug.
The exception we would observe would be:
Unhandled Exception:
System.InvalidOperationException: Process has exited, so the requested information is not available.
at System.Diagnostics.Process.get_ProcessName () [0x0002d] in /Users/alexander/dev/mono/mcs/class/System/System.Diagnostics/Process.cs:336
at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:get_ProcessName ()
at Program.Main (System.String[] args) [0x0003b] in <
9c838a66cdc44c81b38c974edcc9c029>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException: Process has exited, so the requested information is not available.
at System.Diagnostics.Process.get_ProcessName () [0x0002d] in /Users/alexander/dev/mono/mcs/class/System/System.Diagnostics/Process.cs:336
at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:get_ProcessName ()
at Program.Main (System.String[] args) [0x0003b] in <
9c838a66cdc44c81b38c974edcc9c029>:0
Fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=52345