--- C:\--\a\ExternalProgramBase.cs	Sun Dec 28 16:44:38 2003
+++ E:\src\extern\nant\src\NAnt.Core\Tasks\ExternalProgramBase.cs	Thu Jan 08 15:17:13 2004
@@ -44,6 +44,8 @@
         private ArgumentCollection _arguments = new ArgumentCollection();
         private bool _useRuntimeEngine = false;
         private string _exeName = null;
+        private int _resultcode = -1;
 #if (MONO)
         // TO-DO : remove this when issue has been fixed in Mono
         // Mono does not (always) wait for process to exit when large timeout is
@@ -156,11 +158,21 @@
             set { _timeout = value; }
         }
 
+        public int ResultCode {
+            get { return _resultcode; }
+        }
+		
         /// <summary>
         /// The command-line arguments for the external program.
         /// </summary>
@@ -228,6 +240,8 @@
                         Location);
                 }
 
+                _resultcode=process.ExitCode;
+
                 if (process.ExitCode != 0){
                     throw new BuildException(
                         String.Format(CultureInfo.InvariantCulture, 

