diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2001-11-18 19:05:02 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2001-11-18 19:05:02 +0000 |
commit | 293ed4d2d77af94fb636abf7295b5e2dd98c1695 (patch) | |
tree | a82e0fb382530ec8281e930ded155b7fd5808ada /perlio.c | |
parent | ecdeb87c58ecf41e283516bbe30cb8616ec66e13 (diff) | |
download | perl-293ed4d2d77af94fb636abf7295b5e2dd98c1695.tar.gz |
Wrong way to get stdio mode used.
p4raw-id: //depot/perlio@13080
Diffstat (limited to 'perlio.c')
-rw-r--r-- | perlio.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -2496,9 +2496,7 @@ PerlIOStdio_dup(pTHX_ PerlIO *f, PerlIO *o, CLONE_PARAMS *param, int flags) int fd = PerlLIO_dup(fileno(stdio)); if (fd >= 0) { char mode[8]; - int omode = fcntl(fd, F_GETFL); - PerlIO_intmode2str(omode,mode,NULL); - stdio = fdopen(fd, mode); + stdio = fdopen(fd, PerlIO_modestr(o,mode)); } else { /* FIXME: To avoid messy error recovery if dup fails |