diff options
author | Jan Dubois <jand@activestate.com> | 2009-12-02 01:34:18 -0800 |
---|---|---|
committer | Jan Dubois <jand@activestate.com> | 2009-12-02 01:34:18 -0800 |
commit | adab996997d7ef1b54d382f5ab4304f438cd1dd0 (patch) | |
tree | 3f74834a0f10d742b5ffc51fdaecf20db63e859d /win32 | |
parent | 781ecc3f4e65a5261736cf5fa8e56b6bea2ff71a (diff) | |
download | perl-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.h | 5 |
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: |