TAINT_PROPER("``");
fp = my_popen(tmps, "r");
if (fp) {
- sv_setpv(TARG, ""); /* note that this preserves previous buffer */
if (GIMME == G_SCALAR) {
+ sv_setpv(TARG, ""); /* note that this preserves previous buffer */
while (sv_gets(TARG, fp, SvCUR(TARG)) != Nullch)
/*SUPPRESS 530*/
;
XPUSHs(TARG);
+ SvTAINTED_on(TARG);
}
else {
SV *sv;
SvLEN_set(sv, SvCUR(sv)+1);
Renew(SvPVX(sv), SvLEN(sv), char);
}
+ SvTAINTED_on(sv);
}
}
STATUS_NATIVE_SET(my_pclose(fp));
+ TAINT; /* "I believe that this is not gratuitous!" */
}
else {
STATUS_NATIVE_SET(-1);
SV **mark = stack_base + ++*markstack_ptr; /* reuse in entersub */
I32 markoff = mark - stack_base - 1;
char *methname;
+ bool oldmustcatch = mustcatch;
varsv = mark[0];
if (SvTYPE(varsv) == SVt_PVHV)
myop.op_last = (OP *) &myop;
myop.op_next = Nullop;
myop.op_flags = OPf_KNOW|OPf_STACKED;
+ mustcatch = TRUE;
ENTER;
SAVESPTR(op);
runops();
SPAGAIN;
+ mustcatch = oldmustcatch;
sv = TOPs;
if (sv_isobject(sv)) {
if (SvTYPE(varsv) == SVt_PVHV || SvTYPE(varsv) == SVt_PVAV) {
mg = mg_find(sv, 'q') ;
if (mg && SvREFCNT(SvRV(mg->mg_obj)) > 1)
- warn("untie attempted while %d inner references still exist",
- SvREFCNT(SvRV(mg->mg_obj)) - 1 ) ;
+ warn("untie attempted while %lu inner references still exist",
+ (unsigned long)SvREFCNT(SvRV(mg->mg_obj)) - 1 ) ;
}
}
GV *gv;
BINOP myop;
SV *sv;
+ bool oldmustcatch = mustcatch;
hv = (HV*)POPs;
myop.op_last = (OP *) &myop;
myop.op_next = Nullop;
myop.op_flags = OPf_KNOW|OPf_STACKED;
+ mustcatch = TRUE;
ENTER;
SAVESPTR(op);
SPAGAIN;
}
+ mustcatch = oldmustcatch;
if (sv_isobject(TOPs))
sv_magic((SV*)hv, TOPs, 'P', Nullch, 0);
LEAVE;
STATUS_NATIVE_SET(result == -1 ? -1 : status);
do_execfree(); /* free any memory child malloced on vfork */
SP = ORIGMARK;
- PUSHi(STATUS_POSIX);
+ PUSHi(STATUS_CURRENT);
RETURN;
}
if (op->op_flags & OPf_STACKED) {
STATUS_NATIVE_SET(value);
do_execfree();
SP = ORIGMARK;
- PUSHi(STATUS_POSIX);
+ PUSHi(STATUS_CURRENT);
#endif /* !FORK or VMS */
RETURN;
}
#ifdef BSD_GETPGRP
value = (I32)BSD_GETPGRP(pid);
#else
- if (pid != 0 && pid != getpid()) {
+ if (pid != 0 && pid != getpid())
DIE("POSIX getpgrp can't take an argument");
value = (I32)getpgrp();
#endif
#ifdef BSD_SETPGRP
SETi( BSD_SETPGRP(pid, pgrp) >= 0 );
#else
- if ((pgrp != 0 && pgrp != getpid())) || (pid != 0 && pid != getpid())) {
+ if ((pgrp != 0 && pgrp != getpid())) || (pid != 0 && pid != getpid()))
DIE("POSIX setpgrp can't take an argument");
- }
SETi( setpgrp() >= 0 );
#endif /* USE_BSDPGRP */
RETURN;