Lines Matching defs:mode
1572 my_syspopen4(pTHX_ char *cmd, char *mode, I32 cnt, SV** args)
1582 this = (*mode == 'w');
1591 if (p[this] == (*mode == 'r')) { /* if fh 0/1 was initially closed. */
1599 newfd = dup(*mode == 'r'); /* Preserve std* */
1611 fh_fl = fcntl(*mode == 'r', F_GETFD);
1612 if (p[that] != (*mode == 'r')) { /* if fh 0/1 was initially closed. */
1613 dup2(p[that], *mode == 'r');
1625 close(*mode == 'r'); /* It was closed initially */
1626 else if (newfd != (*mode == 'r')) { /* Probably this check is not needed */
1627 dup2(newfd, *mode == 'r'); /* Return std* back. */
1629 fcntl(*mode == 'r', F_SETFD, fh_fl);
1631 fcntl(*mode == 'r', F_SETFD, fh_fl);
1632 if (p[that] == (*mode == 'r'))
1647 return PerlIO_fdopen(p[this], mode);
1658 res = popen(cmd, mode);
1664 res = popen(cmd, mode);
1677 my_syspopen(pTHX_ char *cmd, char *mode)
1679 return my_syspopen4(aTHX_ cmd, mode, 0, NULL);
2584 Perl_warn_nocontext("Unexpected program mode %d when morphing back from PM",
4190 Perl_croak(aTHX_ "OS2::pipe(): can't have message read mode for non-message pipes");