mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-30 11:00:41 +08:00
* 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:
parent
0e5d7582d5
commit
9c29e82edb
@ -1,3 +1,9 @@
|
|||||||
|
2011-11-28 Corinna Vinschen <vinschen@redhat.com>
|
||||||
|
|
||||||
|
* pinfo.cc (pinfo::exit): Call TerminateProcess to avoid potential
|
||||||
|
busy loop in ntdll.dll when calling ExitProcess. Only call ExitProcess
|
||||||
|
as a fallback.
|
||||||
|
|
||||||
2011-11-27 Christopher Faylor <me.cygwin2011@cgf.cx>
|
2011-11-27 Christopher Faylor <me.cygwin2011@cgf.cx>
|
||||||
|
|
||||||
* init.cc (dll_entry): Revert previous change since it caused
|
* init.cc (dll_entry): Revert previous change since it caused
|
||||||
|
@ -210,6 +210,8 @@ pinfo::exit (DWORD n)
|
|||||||
if (!self->cygstarted)
|
if (!self->cygstarted)
|
||||||
exitcode = ((exitcode & 0xff) << 8) | ((exitcode >> 8) & 0xff);
|
exitcode = ((exitcode & 0xff) << 8) | ((exitcode >> 8) & 0xff);
|
||||||
sigproc_printf ("Calling ExitProcess n %p, exitcode %p", n, exitcode);
|
sigproc_printf ("Calling ExitProcess n %p, exitcode %p", n, exitcode);
|
||||||
|
if (!TerminateProcess (GetCurrentProcess (), exitcode))
|
||||||
|
system_printf ("TerminateProcess failed, %E");
|
||||||
ExitProcess (exitcode);
|
ExitProcess (exitcode);
|
||||||
}
|
}
|
||||||
# undef self
|
# undef self
|
||||||
|
Loading…
x
Reference in New Issue
Block a user