branch update for HEAD-2003021201
[reactos.git] / lib / msvcrt / process / _cwait.c
index d4df111..2ab22bb 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * COPYRIGHT:   See COPYING in the top level directory
  * PROJECT:     ReactOS system libraries
- * FILE:        lib/crtdll/process/cwait.c
+ * FILE:        lib/msvcrt/process/cwait.c
  * PURPOSE:     Waits for a process to exit 
  * PROGRAMER:   Boudewijn Dekker
  * UPDATE HISTORY:
 #include <msvcrt/errno.h>
 #include <msvcrt/internal/file.h>
 
+
 int _cwait(int* pnStatus, int hProc, int nAction)
 {
-  DWORD ExitCode;
+    DWORD ExitCode;
 
-  nAction = 0;
-  if (WaitForSingleObject((void *)hProc,INFINITE) != WAIT_OBJECT_0)
-    {
-      __set_errno(ECHILD);
-      return -1;
-    }
+       nAction = 0;
+       if (WaitForSingleObject((void*)hProc, INFINITE) != WAIT_OBJECT_0) {
+               __set_errno(ECHILD);
+               return -1;
+       }
 
-  if (!GetExitCodeProcess((void *)hProc,&ExitCode))
-    return -1;
-  if (pnStatus != NULL)
-    *pnStatus = (int)ExitCode;
-  CloseHandle((HANDLE)hProc);
-  return hProc;
+       if (!GetExitCodeProcess((void*)hProc, &ExitCode))
+               return -1;
+       if (pnStatus != NULL)
+        *pnStatus = (int)ExitCode;
+    CloseHandle((HANDLE)hProc);
+    return hProc;
 }