diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2003-01-13 10:14:22 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2003-01-13 10:14:22 +0000 |
commit | 7e56aaa774b02dc64ace76ea7efe134ad4e18d03 (patch) | |
tree | dc3d6629f11a6b0ec0ca568cad9cbb1853e90bb0 /pp_sys.c | |
parent | 0678cb22c235366e6443f8ba36afc299093d457c (diff) | |
download | perl-7e56aaa774b02dc64ace76ea7efe134ad4e18d03.tar.gz |
Remove workaround for :stdio layer bug now fixed
(Fixes #18975)
p4raw-id: //depot/perlio@18476
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -2455,7 +2455,6 @@ PP(pp_accept) struct sockaddr saddr; /* use a struct to avoid alignment problems */ Sock_size_t len = sizeof saddr; int fd; - int fd2; ggv = (GV*)POPs; ngv = (GV*)POPs; @@ -2476,11 +2475,7 @@ PP(pp_accept) if (IoIFP(nstio)) do_close(ngv, FALSE); IoIFP(nstio) = PerlIO_fdopen(fd, "r"PIPESOCK_MODE); - /* FIXME: we dup(fd) here so that refcounting of fd's does not inhibit - fclose of IoOFP's FILE * - and hence leak memory. - Special treatment of _this_ case of IoIFP != IoOFP seems wrong. - */ - IoOFP(nstio) = PerlIO_fdopen(fd2 = PerlLIO_dup(fd), "w"PIPESOCK_MODE); + IoOFP(nstio) = PerlIO_fdopen(fd, "w"PIPESOCK_MODE); IoTYPE(nstio) = IoTYPE_SOCKET; if (!IoIFP(nstio) || !IoOFP(nstio)) { if (IoIFP(nstio)) PerlIO_close(IoIFP(nstio)); @@ -2490,7 +2485,6 @@ PP(pp_accept) } #if defined(HAS_FCNTL) && defined(F_SETFD) fcntl(fd, F_SETFD, fd > PL_maxsysfd); /* ensure close-on-exec */ - fcntl(fd2, F_SETFD, fd2 > PL_maxsysfd); /* ensure close-on-exec */ #endif #ifdef EPOC |