diff options
author | 2004-12-08 16:48:29 +0000 | |
---|---|---|
committer | 2004-12-08 16:48:29 +0000 | |
commit | d96a538f85a621d6466cc03fc7be971c0d2940d0 (patch) | |
tree | 2ff8b422e3cc84c4d58299f254d27334eaef7321 | |
parent | allow ToS to be set on raw ip sockets (diff) | |
download | wireguard-openbsd-d96a538f85a621d6466cc03fc7be971c0d2940d0.tar.xz wireguard-openbsd-d96a538f85a621d6466cc03fc7be971c0d2940d0.zip |
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@
-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; |