aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/cygheap.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-12-22 18:12:30 +0000
committerChristopher Faylor <me@cgf.cx>2004-12-22 18:12:30 +0000
commit63fcc6d48f520c75e179cc3c1599a6810cfd1943 (patch)
treeed535238cbe2dc07df52490dca1579f9d65408c6 /winsup/cygwin/cygheap.cc
parent16bd231ec6cd293020e4538544f3bd6170f4c6d0 (diff)
downloadnewlib-63fcc6d48f520c75e179cc3c1599a6810cfd1943.zip
newlib-63fcc6d48f520c75e179cc3c1599a6810cfd1943.tar.gz
newlib-63fcc6d48f520c75e179cc3c1599a6810cfd1943.tar.bz2
* cygheap.cc (cygheap_setup_for_child): Add api_fatal to catch failing
MapViewOfFileEx. * cygthread.cc (cygthread::stub): Previous change to make diagnostic output more informative was really a bust. Try again. Capture previous name in a new field in cygthread for diagnostic purposes. (cygthread::cygthread): Ditto. (cygthread::release): Add an argument to control whether h should be cleared or not. (cygthread::terminate_thread): Use 'inuse' for tests rather than 'h'. (cygthread): Add some diagnostic fields. (cygthread::release): Add an argument. * pinfo.cc (proc_waiter): Accommodate change to cygthread::release.
Diffstat (limited to 'winsup/cygwin/cygheap.cc')
-rw-r--r--winsup/cygwin/cygheap.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc
index 6a6aa19..14cdd8d 100644
--- a/winsup/cygwin/cygheap.cc
+++ b/winsup/cygwin/cygheap.cc
@@ -111,6 +111,8 @@ cygheap_setup_for_child (child_info *ci, bool dup_later)
if (!ci->cygheap_h)
api_fatal ("Couldn't create heap for child, size %d, %E", size);
newcygheap = MapViewOfFileEx (ci->cygheap_h, MVMAP_OPTIONS, 0, 0, 0, NULL);
+ if (!newcygheap)
+ api_fatal ("couldn't map space for new cygheap, %E");
ProtectHandle1INH (ci->cygheap_h, passed_cygheap_h);
if (!dup_later)
dup_now (newcygheap, ci, n);