summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2005-01-29 16:14:20 +0000
committerDave Mitchell <davem@fdisolutions.com>2005-01-29 16:14:20 +0000
commit75af1a9c52a124d2be09fece4ba0d7bc6091ed01 (patch)
tree72c61ab031352280e4c8c76d0b1c6ca512b17df2 /pp_sys.c
parentf8901870eae83390cf40d51cb7fd1437ed1fa230 (diff)
downloadperl-75af1a9c52a124d2be09fece4ba0d7bc6091ed01.tar.gz
[perl #33928] chomp() fails after alarm(), `sleep`
PP_backtick's temp altering of PL_rs didn't restore after an exception p4raw-id: //depot/perl@23898
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 0bb716554f..bb843e194a 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -345,13 +345,14 @@ PP(pp_backtick)
;
}
else if (gimme == G_SCALAR) {
- SV *oldrs = PL_rs;
+ ENTER;
+ SAVESPTR(PL_rs);
PL_rs = &PL_sv_undef;
sv_setpv(TARG, ""); /* note that this preserves previous buffer */
while (sv_gets(TARG, fp, SvCUR(TARG)) != Nullch)
/*SUPPRESS 530*/
;
- PL_rs = oldrs;
+ LEAVE;
XPUSHs(TARG);
SvTAINTED_on(TARG);
}