* pinfo.cc (pinfo::exit): Call TerminateProcess to avoid potential

busy loop in ntdll.dll when calling ExitProcess. Only call ExitProcess
	as a fallback.
This commit is contained in:
Corinna Vinschen
2011-11-28 16:00:07 +00:00
parent 0e5d7582d5
commit 9c29e82edb
2 changed files with 8 additions and 0 deletions

View File

@@ -210,6 +210,8 @@ pinfo::exit (DWORD n)
if (!self->cygstarted)
exitcode = ((exitcode & 0xff) << 8) | ((exitcode >> 8) & 0xff);
sigproc_printf ("Calling ExitProcess n %p, exitcode %p", n, exitcode);
if (!TerminateProcess (GetCurrentProcess (), exitcode))
system_printf ("TerminateProcess failed, %E");
ExitProcess (exitcode);
}
# undef self