diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2011-11-28 16:00:07 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2011-11-28 16:00:07 +0000 |
commit | 9c29e82edb3a74d1adbe3156ac84497a85859ee4 (patch) | |
tree | 9d4305611b899de6ddc5db8ead067f2ac6476678 /winsup | |
parent | 0e5d7582d5dc06419bf2f51a31a779e7e3a0735c (diff) | |
download | cygnal-9c29e82edb3a74d1adbe3156ac84497a85859ee4.tar.gz cygnal-9c29e82edb3a74d1adbe3156ac84497a85859ee4.tar.bz2 cygnal-9c29e82edb3a74d1adbe3156ac84497a85859ee4.zip |
* pinfo.cc (pinfo::exit): Call TerminateProcess to avoid potential
busy loop in ntdll.dll when calling ExitProcess. Only call ExitProcess
as a fallback.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/pinfo.cc | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 41922169b..b81454497 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -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> * init.cc (dll_entry): Revert previous change since it caused diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index d3e68bf32..dacf5256e 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -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 |