- Don't try to close the thread handle twice.  
- Close the process handle on exit for _P_OVERLAY.
Modified: trunk/reactos/lib/crt/process/process.c

Modified: trunk/reactos/lib/crt/process/process.c
--- trunk/reactos/lib/crt/process/process.c	2005-08-09 15:44:54 UTC (rev 17240)
+++ trunk/reactos/lib/crt/process/process.c	2005-08-09 15:47:14 UTC (rev 17241)
@@ -299,19 +299,17 @@
    {
       case _P_NOWAIT:
       case _P_NOWAITO:
-         CloseHandle(ProcessInformation.hThread);
          return((int)ProcessInformation.hProcess);
       case _P_OVERLAY:
+         CloseHandle(ProcessInformation.hProcess);
          _exit(0);
       case _P_WAIT:
          WaitForSingleObject(ProcessInformation.hProcess, INFINITE);
          GetExitCodeProcess(ProcessInformation.hProcess, &dwExitCode);
          CloseHandle(ProcessInformation.hProcess);
-         CloseHandle(ProcessInformation.hThread);
          return( (int)dwExitCode); //CORRECT?
       case _P_DETACH:
          CloseHandle(ProcessInformation.hProcess);
-         CloseHandle(ProcessInformation.hThread);
          return( 0);
    }
    return( (int)ProcessInformation.hProcess);