diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 2006-12-12 15:28:25 -0800 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2006-12-13 19:53:02 +0000 |
commit | 713cef20be507239588df9cdc5f99ce04b7e0b40 (patch) | |
tree | 00549fe2cfdf237bcf2e21de1c56a041f532ad4c /util.c | |
parent | 4d28fe79573bb61e3777837866812631f24ed631 (diff) | |
download | perl-713cef20be507239588df9cdc5f99ce04b7e0b40.tar.gz |
Text mode wrongly set on pipe file descriptors
Message-ID: <20061213072825.GA26300@powdermilk.math.berkeley.edu>
p4raw-id: //depot/perl@29550
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -2356,6 +2356,14 @@ Perl_my_popen(pTHX_ const char *cmd, const char *mode) PerlProc__exit(1); } #endif /* defined OS2 */ + +#ifdef PERLIO_USING_CRLF + /* Since we circumvent IO layers when we manipulate low-level + filedescriptors directly, need to manually switch to the + default, binary, low-level mode; see PerlIOBuf_open(). */ + PerlLIO_setmode((*mode == 'r'), O_BINARY); +#endif + if ((tmpgv = gv_fetchpvs("$", GV_ADD|GV_NOTQUAL, SVt_PV))) { SvREADONLY_off(GvSV(tmpgv)); sv_setiv(GvSV(tmpgv), PerlProc_getpid()); |