You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2006/08/21 19:37:01 UTC

svn commit: r433300 - /incubator/stdcxx/trunk/util/exec.cpp

Author: sebor
Date: Mon Aug 21 10:37:01 2006
New Revision: 433300

URL: http://svn.apache.org/viewvc?rev=433300&view=rev
Log:
2006-08-21 Farid Zaripov <fa...@kyiv.vdiweb.com>

        * exec.cpp [_WIN32 || _WIN64] (exec_file): WAIT_FAIL replaced
        with WAIT_FAILED; fixed incorrect parameter in calls CloseHandle
        and WaitForSingleObject.

Modified:
    incubator/stdcxx/trunk/util/exec.cpp

Modified: incubator/stdcxx/trunk/util/exec.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/exec.cpp?rev=433300&r1=433299&r2=433300&view=diff
==============================================================================
--- incubator/stdcxx/trunk/util/exec.cpp (original)
+++ incubator/stdcxx/trunk/util/exec.cpp Mon Aug 21 10:37:01 2006
@@ -952,7 +952,7 @@
     if (-1 == status.status)
         return status;
 
-    if (0 == CloseHandle (context.hThread))
+    if (0 == CloseHandle (child.hThread))
         warn_last_error ("Closing child main thread handle");
 
     /* Wait for the child process to terminate */
@@ -970,7 +970,7 @@
             status.error = warn_last_error ("Waiting for child process");
         }
 
-        if (0 == CloseHandle (context.hProcess))
+        if (0 == CloseHandle (child.hProcess))
             warn_last_error ("Closing child process handle");
         return status;
     }
@@ -1012,7 +1012,7 @@
                 status.error = warn_last_error ("Waiting for child process");
             }
 
-            if (0 == CloseHandle (context.hProcess))
+            if (0 == CloseHandle (child.hProcess))
                 warn_last_error ("Closing child process handle");
             return status;
         }
@@ -1020,7 +1020,7 @@
     /* Then hard kill the child process */
     if (0 == TerminateProcess (child.hProcess, 3))
         warn_last_error ("Terminating child process");
-    else if (WAIT_FAIL == WaitForSingleObject (child.hProcess, 1000))
+    else if (WAIT_FAILED == WaitForSingleObject (child.hProcess, 1000))
         warn_last_error ("Waiting for child process");
 
     if (0 == GetExitCodeProcess (child.hProcess, &status.status)) {
@@ -1028,7 +1028,7 @@
         status.status = -1;
     }
     status.error = 3;
-    if (0 == CloseHandle (context.hProcess))
+    if (0 == CloseHandle (child.hProcess))
         warn_last_error ("Closing child process handle");
     return status;
 }