Change 18505 by jhi@lyta on 2003/01/17 13:36:55
Integrate:
[ 18504]
Integrate from perlio:
[ 18476]
Remove workaround for :stdio layer bug now fixed
(Fixes #18975)
Affected files ...
... //depot/maint-5.8/perl/pp_sys.c#10 integrate
Differences ...
==== //depot/maint-5.8/perl/pp_sys.c#10 (text) ====
Index: perl/pp_sys.c
--- perl/pp_sys.c#9~18458~ Wed Jan 8 11:43:26 2003
+++ perl/pp_sys.c Fri Jan 17 05:36:55 2003
@@ -2459,7 +2459,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;
@@ -2480,11 +2479,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));
@@ -2494,7 +2489,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.