diff options
author | Lluis Sanchez <lluis@novell.com> | 2004-06-17 03:16:49 +0400 |
---|---|---|
committer | Lluis Sanchez <lluis@novell.com> | 2004-06-17 03:16:49 +0400 |
commit | add2bf8f6996251e1f665aa8281149789446b1ca (patch) | |
tree | dbbf49f1cb34b981bd5a4b5cd4801d857c784004 /mcs/class/System/System.Diagnostics | |
parent | e51bb93c12dd7bfdcf97cd9ce7ec9d9757779829 (diff) |
* Process.cs: Added missing check in HasExited property.
svn path=/trunk/mcs/; revision=29721
Diffstat (limited to 'mcs/class/System/System.Diagnostics')
-rw-r--r-- | mcs/class/System/System.Diagnostics/ChangeLog | 4 | ||||
-rwxr-xr-x | mcs/class/System/System.Diagnostics/Process.cs | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/mcs/class/System/System.Diagnostics/ChangeLog b/mcs/class/System/System.Diagnostics/ChangeLog index 108ccfe6fa0..a138f2c77e8 100644 --- a/mcs/class/System/System.Diagnostics/ChangeLog +++ b/mcs/class/System/System.Diagnostics/ChangeLog @@ -1,3 +1,7 @@ +2004-06-17 Lluis Sanchez Gual <lluis@ximian.com> + + * Process.cs: Added missing check in HasExited property. + 2004-05-20 Gert Driesen (drieseng@users.sourceforge.net) * EventLogPermissionAttribute.cs: diff --git a/mcs/class/System/System.Diagnostics/Process.cs b/mcs/class/System/System.Diagnostics/Process.cs index 54b594e83b7..1bbb1266ff0 100755 --- a/mcs/class/System/System.Diagnostics/Process.cs +++ b/mcs/class/System/System.Diagnostics/Process.cs @@ -137,6 +137,9 @@ namespace System.Diagnostics { [MonitoringDescription ("Determines if the process is still running.")] public bool HasExited { get { + if (process_handle == IntPtr.Zero) + throw new InvalidOperationException ("Process has not been started."); + int exitcode = ExitCode_internal (process_handle); if(exitcode==259) { |