summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorDavid Golden <dagolden@cpan.org>2010-11-06 16:00:18 -0400
committerDavid Golden <dagolden@cpan.org>2010-11-06 16:17:54 -0400
commitda0fccaa0e290c565d88bc542548280209bdb7bc (patch)
tree5d2e69711c81edba21c40909d2dbd1c1f1c6517b /perlio.c
parent5eee610985ca64b9b403941bb9a1361067091e4b (diff)
downloadperl-da0fccaa0e290c565d88bc542548280209bdb7bc.tar.gz
localize $@ during binmode (RT#78844)
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/perlio.c b/perlio.c
index 1440048723..4073c97b54 100644
--- a/perlio.c
+++ b/perlio.c
@@ -1340,6 +1340,8 @@ int
PerlIO_apply_layers(pTHX_ PerlIO *f, const char *mode, const char *names)
{
int code = 0;
+ ENTER;
+ save_scalar(PL_errgv);
if (f && names) {
PerlIO_list_t * const layers = PerlIO_list_alloc(aTHX);
code = PerlIO_parse_layers(aTHX_ layers, names);
@@ -1348,6 +1350,7 @@ PerlIO_apply_layers(pTHX_ PerlIO *f, const char *mode, const char *names)
}
PerlIO_list_free(aTHX_ layers);
}
+ LEAVE;
return code;
}