Re: [Patch] [perl #32446] close leaves fd open

2004-12-02 Thread Steffen Ullrich
-_buffer */ f-_handle = -1; Steffen Ullrich wrote: perl #32446 describes a bug with perl5.8 on OpenBSD, where a STDOUT gets duped to a socket and a close(STDOUT) later leaves the socket open. Attached is a proposed and tested fix for the problem, which simply duplicates the FreeBSD code

Re: [Patch] [perl #32446] close leaves fd open

2004-12-02 Thread Steffen Ullrich
ooops, forgot to attach the patch --- /usr/src/gnu/usr.bin/perl/perlio.c Mon Aug 9 20:08:55 2004 +++ perlio.cWed Dec 1 14:22:48 2004 @@ -2875,6 +2875,13 @@ */ f-_file = -1; return 1; +# elif defined(__OpenBSD__) +/* There may be a better way on OpenBSD: +- we

[Patch] [perl #32446] close leaves fd open

2004-12-01 Thread Steffen Ullrich
perl #32446 describes a bug with perl5.8 on OpenBSD, where a STDOUT gets duped to a socket and a close(STDOUT) later leaves the socket open. Attached is a proposed and tested fix for the problem, which simply duplicates the FreeBSD code for OpenBSD. Details: In perlio.c there is a function

close(STDOUT) dups STDOUT, even if STDOUT is socket (perlbug #32446)

2004-11-25 Thread Steffen Ullrich
Hi, Since there is no reply yet to this perlbug (http://rt.perl.org/rt3/Ticket/Display.html?id=32446) I'll try to get more help here: I have a small IO::Socket::INET based server. When the server gets a new client socket from an accept call it dups this socket to STDIN + STDOUT and closes the