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-03-13 22:20:32 +0300
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2003-03-13 22:20:32 +0300
commit31e90cb37e8d98e0f0ab91b473cfc6c358ad8181 (patch)
tree240f62536bfce0bd50f33d590f4b3680c9007a4c /mcs/class/System/System.Diagnostics
parent019f67dea211eb7dbbe1dc8e0347cc7756cd6eaa (diff)
2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* Process.cs: throw an exception when the executable cannot be found. svn path=/trunk/mcs/; revision=12477
Diffstat (limited to 'mcs/class/System/System.Diagnostics')
-rw-r--r--mcs/class/System/System.Diagnostics/ChangeLog48
-rwxr-xr-xmcs/class/System/System.Diagnostics/Process.cs17
2 files changed, 42 insertions, 23 deletions
diff --git a/mcs/class/System/System.Diagnostics/ChangeLog b/mcs/class/System/System.Diagnostics/ChangeLog
index 2eb2191238e..95fdbc60833 100644
--- a/mcs/class/System/System.Diagnostics/ChangeLog
+++ b/mcs/class/System/System.Diagnostics/ChangeLog
@@ -1,29 +1,35 @@
+2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * Process.cs: throw an exception when the executable cannot be found.
+
2002-12-20 Jonathan Pryor <jonpryor@vt.edu>
* DiagnosticsConfigurationHandler.cs:
- Don't assume that optional attributes are always present
- - <assert/> can't have any child nodes
- - Change in semantics: if the attribute isn't present, GetAttribute()
- returns null, not "". This allows us to differentiate between an
- attribute not being present and an attribute with an empty value.
- - Translate exceptions if a TraceListener type is invalid
+ - <assert/> can't have any child nodes
+ - Change in semantics: if the attribute isn't present,
+ GetAttribute() returns null, not "". This allows us to
+ differentiate between an attribute not being present and an
+ attribute with an empty value.
+ - Translate exceptions if a TraceListener type is invalid
2002-12-19 Jonathan Pryor <jonpryor@vt.edu>
* TraceListenerCollection.cs: IndentLevel and IndentSize shouldn't be
- hardcoded; they should be set to whatever TraceImpl is using (which in
- turn may have been set by the .config file, so we should get the
+ hardcoded; they should be set to whatever TraceImpl is using (which
+ in turn may have been set by the .config file, so we should get the
user-specified values in added listeners).
* TraceListener.cs: Make sure that indents are initially written. This
allows code that uses Trace.Indent() before a Trace.WriteLine() to be
indented properly.
* TraceImpl.cs: provide a static constructor to explicitly specify the
- ordering of initialization, in particular the ordering of
- TraceImpl.Listeners and the reading of the .config file (by accessing
- DiagnosticsConfiguration.Settings). This (hopefully) ensures that the
- Listeners collection is initialized before the .config file is read in, as
- the DiagnosticsConfigurationHandler will directly modify the listeners
- collection.
- The DiagnosticsConfigurationHandler assumes this so that it can <add/> and
- <remove/> trace listeners and set the logfile for the DefaultTraceListener.
+ ordering of initialization, in particular the ordering of
+ TraceImpl.Listeners and the reading of the .config file (by
+ accessing DiagnosticsConfiguration.Settings). This (hopefully)
+ ensures that the Listeners collection is initialized before the
+ .config file is read in, as the DiagnosticsConfigurationHandler will
+ directly modify the listeners collection.
+ The DiagnosticsConfigurationHandler assumes this so that it can
+ <add/> and <remove/> trace listeners and set the logfile for the
+ DefaultTraceListener.
2002-12-18 Jonathan Pryor <jonpryor@vt.edu>
@@ -33,16 +39,16 @@
- Give `AssertUiEnabled' an actual backing member
* DiagnosticsConfigurationHandler.cs: To avoid race conditions, let the
configuration handler set .config-specified properties on
- DefaultTraceListener (AssertUiEnabled, LogFileName) and TraceImpl
+ DefaultTraceListener (AssertUiEnabled, LogFileName) and TraceImpl
(AutoFlush, IndentSize).
* Switch.cs: Near complete re-write. Actually works, and is (should be)
- comformant with .NET behavior. Changed member names because they were
- confusing me. (Yes, that doesn't say much about my memory.)
- * TextWriterTraceListener.cs: Append text to already existing files, don't
- overwrite them.
+ comformant with .NET behavior. Changed member names because they
+ were confusing me. (Yes, that doesn't say much about my memory.)
+ * TextWriterTraceListener.cs: Append text to already existing files,
+ don't overwrite them.
* TraceImpl.cs:
- Added private destructor, to ensure no instances are created.
- - Move members declarations to be closer to each other.
+ - Move members declarations to be closer to each other.
* TraceSwitch.cs: Complete re-write. It works now.
2002-12-17 Jonathan Pryor <jonpryor@vt.edu>
diff --git a/mcs/class/System/System.Diagnostics/Process.cs b/mcs/class/System/System.Diagnostics/Process.cs
index 822453f97b9..d3cb2d4dd51 100755
--- a/mcs/class/System/System.Diagnostics/Process.cs
+++ b/mcs/class/System/System.Diagnostics/Process.cs
@@ -587,11 +587,24 @@ namespace System.Diagnostics {
stdin_rd, stdout_wr, stderr_wr,
ref proc_info);
+ MonoIOError error;
+
+ if (!ret) {
+ if (stdin_rd != IntPtr.Zero)
+ MonoIO.Close (stdin_rd, out error);
+
+ if (stdout_wr != IntPtr.Zero)
+ MonoIO.Close (stdout_wr, out error);
+
+ if (stderr_wr != IntPtr.Zero)
+ MonoIO.Close (stderr_wr, out error);
+
+ throw new Win32Exception ();
+ }
+
process.process_handle=proc_info.process_handle;
process.pid=proc_info.pid;
- MonoIOError error;
-
if(startInfo.RedirectStandardInput==true) {
MonoIO.Close(stdin_rd, out error);
process.input_stream=new StreamWriter(new FileStream(stdin_wr, FileAccess.Write, true));