summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorJan Dubois <jand@activestate.com>2009-12-02 01:34:18 -0800
committerJan Dubois <jand@activestate.com>2009-12-02 01:34:18 -0800
commitadab996997d7ef1b54d382f5ab4304f438cd1dd0 (patch)
tree3f74834a0f10d742b5ffc51fdaecf20db63e859d /win32
parent781ecc3f4e65a5261736cf5fa8e56b6bea2ff71a (diff)
downloadperl-adab996997d7ef1b54d382f5ab4304f438cd1dd0.tar.gz
Cleanup all scopes before exiting a pseudo-forked process.
perl_destruct() contains an assertion that the scope stack is empty. The remaining scopes are due to fork() being called from within a BEGIN block.
Diffstat (limited to 'win32')
-rw-r--r--win32/perlhost.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/win32/perlhost.h b/win32/perlhost.h
index 61f87659df..5e89f854f8 100644
--- a/win32/perlhost.h
+++ b/win32/perlhost.h
@@ -1769,6 +1769,11 @@ restart:
switch (status) {
case 0:
CALLRUNOPS(aTHX);
+ /* We may have additional unclosed scopes if fork() was called
+ * from within a BEGIN block. See perlfork.pod for more details.
+ */
+ while (PL_scopestack_ix > oldscope)
+ LEAVE;
status = 0;
break;
case 2: