* dcrt0.cc (child_info_fork::alloc_stack): Fix a comparison to avoid

taking 4K more stack in forked child.
	* fork.cc (frok::parent): Print child exit code in hex if sync failed.
This commit is contained in:
Corinna Vinschen 2013-06-27 17:00:12 +00:00
parent 27ad840ea5
commit 9626422634
3 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2013-06-27 Corinna Vinschen <corinna@vinschen.de>
* dcrt0.cc (child_info_fork::alloc_stack): Fix a comparison to avoid
taking 4K more stack in forked child.
* fork.cc (frok::parent): Print child exit code in hex if sync failed.
2013-06-24 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> 2013-06-24 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* common.din (rawmemchr): Export. * common.din (rawmemchr): Export.

View File

@ -482,7 +482,7 @@ child_info_fork::alloc_stack ()
else else
{ {
char *st = (char *) stacktop; char *st = (char *) stacktop;
while (_tlstop >= st) while (_tlstop > st)
stackp = getstack (stackp); stackp = getstack (stackp);
stackaddr = 0; stackaddr = 0;
/* This only affects forked children of a process started from a native /* This only affects forked children of a process started from a native

View File

@ -398,7 +398,7 @@ frok::parent (volatile char * volatile stack_here)
/* Wait for subproc to initialize itself. */ /* Wait for subproc to initialize itself. */
if (!ch.sync (pi.dwProcessId, hchild, FORK_WAIT_TIMEOUT)) if (!ch.sync (pi.dwProcessId, hchild, FORK_WAIT_TIMEOUT))
{ {
if (!error ("forked process %u died unexpectedly, retry %d, exit code %d", if (!error ("forked process %u died unexpectedly, retry %d, exit code %y",
pi.dwProcessId, ch.retry, ch.exit_code)) pi.dwProcessId, ch.retry, ch.exit_code))
continue; continue;
this_errno = EAGAIN; this_errno = EAGAIN;