diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2005-01-29 16:14:20 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2005-01-29 16:14:20 +0000 |
commit | 92b68a29ed582020ef865e2fadd8f527c9117876 (patch) | |
tree | 72c61ab031352280e4c8c76d0b1c6ca512b17df2 /pp_sys.c | |
parent | 592561f9ce51945ec099a20cd072f978aaca81db (diff) | |
download | perl-92b68a29ed582020ef865e2fadd8f527c9117876.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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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); } |