diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-09 22:47:39 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-09 22:47:39 +0000 |
commit | 45bc920620377d5a7720d3d562c48df1eb0c2e68 (patch) | |
tree | ddf80cf0881964ffc19fe3b1f195ebfb7cc09284 /util.c | |
parent | 46a8855a50eb32c89dd161fbf5c3956ca0e452d8 (diff) | |
download | perl-45bc920620377d5a7720d3d562c48df1eb0c2e68.tar.gz |
flush all open output buffers before fork(), exec(), system, qx//
and pipe open() operations, simplifying buffering headaches faced
by users; uses fflush(NULL), which may need Configure test
p4raw-id: //depot/perl@3352
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1911,6 +1911,7 @@ my_popen(char *cmd, char *mode) SV *sv; I32 doexec = strNE(cmd,"-"); + PERL_FLUSHALL_FOR_CHILD; #ifdef OS2 if (doexec) { return my_syspopen(cmd,mode); @@ -1984,12 +1985,11 @@ my_popen(char *cmd, char *mode) #if defined(atarist) || defined(DJGPP) FILE *popen(); PerlIO * -my_popen(cmd,mode) -char *cmd; -char *mode; +my_popen(char *cmd, char *mode) { /* Needs work for PerlIO ! */ /* used 0 for 2nd parameter to PerlIO-exportFILE; apparently not used */ + PERL_FLUSHALL_FOR_CHILD; return popen(PerlIO_exportFILE(cmd, 0), mode); } #endif |