From: Steffen Ullrich Date: Wed, 1 Dec 2004 15:22:34 +0000 (+0100) Subject: [Patch] [perl #32446] close leaves fd open X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0c49ea6ab2795f5fde8510752a5ebb44587caca8;p=p5sagit%2Fp5-mst-13.2.git [Patch] [perl #32446] close leaves fd open Message-ID: <20041201142236.4273.qmail@lists.develooper.com> p4raw-id: //depot/perl@23844 --- diff --git a/perlio.c b/perlio.c index 745f62e..19c05cb 100644 --- a/perlio.c +++ b/perlio.c @@ -2885,6 +2885,13 @@ PerlIOStdio_invalidate_fileno(pTHX_ FILE *f) */ f->_file = -1; return 1; +# elif defined(__OpenBSD__) + /* There may be a better way on OpenBSD: + - we could insert a dummy func in the _close function entry + f->_close = (int (*)(void *)) dummy_close; + */ + f->_file = -1; + return 1; # elif defined(__EMX__) /* f->_flags &= ~_IOOPEN; */ /* Will leak stream->_buffer */ f->_handle = -1;