Change 18504 by jhi@lyta on 2003/01/17 13:21:51
Integrate from perlio:
[ 18476]
Remove workaround for :stdio layer bug now fixed
(Fixes #18975)
Affected files ...
... //depot/perl/pp_sys.c#329 integrate
Differences ...
==== //depot/perl/pp_sys.c#329 (text) ====
Index: perl/pp_sys.c
--- perl/pp_sys.c#328~18456~ Tue Jan 7 01:20:22 2003
+++ perl/pp_sys.c Fri Jan 17 05:21:51 2003
@@ -2455,7 +2455,6 @@
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 @@
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 @@
}
#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
End of Patch.