This really needs to go in a branch. It needs heavy testing and can't coincide with the current shell32 due to PSDK interface changes

svn path=/branches/shell32_new-bringup/; revision=51893
This commit is contained in:
Ged Murphy 2011-05-24 18:40:34 +00:00
parent 4596e5e59b
commit 4019caae75
23116 changed files with 0 additions and 1109022 deletions

View file

@ -0,0 +1,32 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/msvcrt/process/cwait.c
* PURPOSE: Waits for a process to exit
* PROGRAMER: Ariadne
* UPDATE HISTORY:
* 04/03/99: Created
*/
#include <precomp.h>
/*
* @implemented
*/
int _cwait(int* pnStatus, int hProc, int nAction)
{
DWORD ExitCode;
nAction = 0;
if (WaitForSingleObject((void*)ULongToPtr(hProc), INFINITE) != WAIT_OBJECT_0) {
__set_errno(ECHILD);
return -1;
}
if (!GetExitCodeProcess((void*)ULongToPtr(hProc), &ExitCode))
return -1;
if (pnStatus != NULL)
*pnStatus = (int)ExitCode;
CloseHandle((HANDLE)ULongToPtr(hProc));
return hProc;
}