diff options
author | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2003-12-10 19:48:12 +0300 |
---|---|---|
committer | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2003-12-10 19:48:12 +0300 |
commit | 160303bc5c568a9877d0a623541daa6bf17b0574 (patch) | |
tree | eefaf3e9ac26b55da8757473d9e58b8a8abce7ae /mcs/class/System/System.Diagnostics | |
parent | 1ba378b2572e24853e7283262861b2d2aa902057 (diff) |
2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* Process.cs: if there's an error when starting the process, the 'pid'
field contains the GetLastError code. Use that for the Win32Exception.
svn path=/trunk/mcs/; revision=20976
Diffstat (limited to 'mcs/class/System/System.Diagnostics')
-rw-r--r-- | mcs/class/System/System.Diagnostics/ChangeLog | 5 | ||||
-rwxr-xr-x | mcs/class/System/System.Diagnostics/Process.cs | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/mcs/class/System/System.Diagnostics/ChangeLog b/mcs/class/System/System.Diagnostics/ChangeLog index d15463fad66..787481f314d 100644 --- a/mcs/class/System/System.Diagnostics/ChangeLog +++ b/mcs/class/System/System.Diagnostics/ChangeLog @@ -1,3 +1,8 @@ +2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * Process.cs: if there's an error when starting the process, the 'pid' + field contains the GetLastError code. Use that for the Win32Exception. + 2003-12-06 Martin Baulig <martin@ximian.com> * DefaultTraceListener: Don't use `where' in variable names. diff --git a/mcs/class/System/System.Diagnostics/Process.cs b/mcs/class/System/System.Diagnostics/Process.cs index 060e822e5ef..1de6f0f4b17 100755 --- a/mcs/class/System/System.Diagnostics/Process.cs +++ b/mcs/class/System/System.Diagnostics/Process.cs @@ -27,7 +27,7 @@ namespace System.Diagnostics { { public IntPtr process_handle; public IntPtr thread_handle; - public int pid; + public int pid; // Contains -GetLastError () on failure. public int tid; }; @@ -690,7 +690,7 @@ namespace System.Diagnostics { if (startInfo.RedirectStandardError == true) MonoIO.Close (stderr_wr, out error); - throw new Win32Exception (); + throw new Win32Exception (-proc_info.pid); } process.process_handle=proc_info.process_handle; |