if (*name == '|') {
/*SUPPRESS 530*/
for (name++; isSPACE(*name); name++) ;
+ if (*name == '\0') { /* command is missing 19990114 */
+ dTHR;
+ if (ckWARN(WARN_PIPE))
+ warner(WARN_PIPE, "Missing command in piped open");
+ errno = EPIPE;
+ goto say_false;
+ }
if (strNE(name,"-"))
TAINT_ENV();
TAINT_PROPER("piped open");
name[--len] = '\0';
/*SUPPRESS 530*/
for (; isSPACE(*name); name++) ;
+ if (*name == '\0') { /* command is missing 19990114 */
+ dTHR;
+ if (ckWARN(WARN_PIPE))
+ warner(WARN_PIPE, "Missing command in piped open");
+ errno = EPIPE;
+ goto say_false;
+ }
if (strNE(name,"-"))
TAINT_ENV();
TAINT_PROPER("piped open");
PerlIO_clearerr(fp);
}
#if defined(HAS_FCNTL) && defined(F_SETFD)
- fd = PerlIO_fileno(fp);
- fcntl(fd,F_SETFD,fd > PL_maxsysfd);
+ {
+ int save_errno = errno;
+ fd = PerlIO_fileno(fp);
+ fcntl(fd,F_SETFD,fd > PL_maxsysfd); /* can change errno */
+ errno = save_errno;
+ }
#endif
IoIFP(io) = fp;
if (writing) {
|| (_djstat_fail_bits & _STFAIL_TRUENAME)!=0
#endif
) {
- warn("Can't do inplace edit: %s would not be uniq",
+ warn("Can't do inplace edit: %s would not be unique",
SvPVX(sv) );
do_close(gv,FALSE);
continue;
if (flag != TRUE)
croak("panic: unsetting binmode"); /* Not implemented yet */
#ifdef DOSISH
-#ifdef atarist
+#if defined(atarist) || defined(__MINT__)
if (!PerlIO_flush(fp) && (fp->_flag |= _IOBIN))
return 1;
else
#define APPLY_TAINT_PROPER() \
STMT_START { \
- if (PL_tainting && PL_tainted) { goto taint_proper_label; } \
+ if (PL_tainted) { TAINT_PROPER(what); } \
} STMT_END
/* This is a first heuristic; it doesn't catch tainting magic. */
}
return tot;
- taint_proper_label:
- TAINT_PROPER(what);
- return 0; /* this should never happen */
-
#undef APPLY_TAINT_PROPER
}