fix busy loop if child exits without closing the child properly

This commit is contained in:
Glenn Maynard
2006-02-13 22:58:23 +00:00
parent 3c4087a187
commit 9eddbde5ac
+1 -2
View File
@@ -252,8 +252,7 @@ void RunChild()
{
int iCmd;
DWORD iActual;
ReadFile( hFromStdout, &iCmd, sizeof(iCmd), &iActual, NULL );
if( iCmd == 0 )
if( !ReadFile(hFromStdout, &iCmd, sizeof(iCmd), &iActual, NULL) )
break;
/* Ugly: the new process can't execute GetModuleFileName on this process,