systems Wrong Thing would be done. (And as Sarathy
points out, closing both ends of a pipe is rather
identical to never opening it...)
p4raw-id: //depot/perl@20653
PerlLIO_close(pp[0]);
#if defined(HAS_FCNTL) && defined(F_SETFD)
fcntl(pp[1], F_SETFD, FD_CLOEXEC);
-#else
- PerlLIO_close(pp[1]); /* Do as best as we can: pretend success. */
#endif
}
if (PL_op->op_flags & OPf_STACKED) {
#if defined(HAS_FCNTL) && defined(F_SETFD)
/* Close error pipe automatically if exec works */
fcntl(pp[1], F_SETFD, FD_CLOEXEC);
-#else
- PerlLIO_close(pp[1]); /* Do as best as we can: pretend success. */
#endif
}
/* Now dup our end of _the_ pipe to right position */
PerlLIO_close(pp[0]);
#if defined(HAS_FCNTL) && defined(F_SETFD)
fcntl(pp[1], F_SETFD, FD_CLOEXEC);
-#else
- PerlLIO_close(pp[1]); /* Do as best as we can: pretend success. */
#endif
}
if (p[THIS] != (*mode == 'r')) {