Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2003-12-10 19:48:12 +0300
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2003-12-10 19:48:12 +0300
commit160303bc5c568a9877d0a623541daa6bf17b0574 (patch)
treeeefaf3e9ac26b55da8757473d9e58b8a8abce7ae /mcs/class/System/System.Diagnostics
parent1ba378b2572e24853e7283262861b2d2aa902057 (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/ChangeLog5
-rwxr-xr-xmcs/class/System/System.Diagnostics/Process.cs4
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;