diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2004-12-08 16:48:30 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2004-12-08 16:48:30 +0000 |
commit | f2120ac63bde84542bee3561875a26beae9eb6e6 (patch) | |
tree | 10905718b1781007545499c05c7339e409d548a8 /gnu | |
parent | ccdf3c4ac01c1d5ca44cbc2a96c2269d276fe6b5 (diff) |
fix perlbug 32446: socket on fd 1 gets duped to fd 0 on close(STDIN)+close(STDOUT);
from Steffen Ullrich at genua.de; ok millert@
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/perl/perlio.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gnu/usr.bin/perl/perlio.c b/gnu/usr.bin/perl/perlio.c index 35a982ecc10..2be59ebc456 100644 --- a/gnu/usr.bin/perl/perlio.c +++ b/gnu/usr.bin/perl/perlio.c @@ -2875,6 +2875,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; |