X-Git-Url: http://git.jankratochvil.net/?p=reactos.git;a=blobdiff_plain;f=lib%2Fmsvcrt%2Fprocess%2F_cwait.c;h=2ab22bbd97ca822b99e9b4fa6e08bd4c8ab6c6f3;hp=d4df111c817600fe18dad0da592570b10cfbeeb8;hb=03af8776dc14167b078911b0c7c5327d1bcdd128;hpb=f4077c1bf64ef89d74a8d4822d2d7aada3ba9927 diff --git a/lib/msvcrt/process/_cwait.c b/lib/msvcrt/process/_cwait.c index d4df111..2ab22bb 100644 --- a/lib/msvcrt/process/_cwait.c +++ b/lib/msvcrt/process/_cwait.c @@ -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: @@ -12,21 +12,21 @@ #include #include + 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; }