summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--op.c1
-rw-r--r--pod/perldiag.pod5
-rw-r--r--pp_sys.c9
-rwxr-xr-xt/op/misc.t8
4 files changed, 4 insertions, 19 deletions
diff --git a/op.c b/op.c
index 9e4f084d29..7ccfe1655e 100644
--- a/op.c
+++ b/op.c
@@ -1401,6 +1401,7 @@ is_handle_constructor(OP *o, I32 argnum)
/* FALL THROUGH */
case OP_SYSOPEN:
case OP_OPEN:
+ case OP_SELECT: /* XXX c.f. SelectSaver.pm */
case OP_SOCKET:
case OP_OPEN_DIR:
case OP_ACCEPT:
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index c303c003a6..eb84876d4e 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -2323,11 +2323,6 @@ was either never opened or has since been closed.
(F) This machine doesn't implement the select() system call.
-=item select() on unopened file
-
-(W) You tried to use the select() function on a filehandle that
-was either never opened or has since been closed.
-
=item sem%s not implemented
(F) You don't have System V semaphore IPC on your system.
diff --git a/pp_sys.c b/pp_sys.c
index e4694bcfb6..a35a2060b9 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1003,13 +1003,8 @@ PP(pp_select)
}
if (newdefout) {
- if (!GvIO(newdefout)) {
- if (ckWARN(WARN_UNOPENED))
- warner(WARN_UNOPENED, "select() on unopened file");
- if (SvTYPE(newdefout) != SVt_PVGV)
- RETURN;
- gv_IOadd(newdefout); /* XXX probably bogus */
- }
+ if (!GvIO(newdefout))
+ gv_IOadd(newdefout);
setdefout(newdefout);
}
diff --git a/t/op/misc.t b/t/op/misc.t
index 778476e124..acef29de9a 100755
--- a/t/op/misc.t
+++ b/t/op/misc.t
@@ -414,13 +414,7 @@ destroyed
package X;
sub any { bless {} }
my $f = "FH000"; # just to thwart any future optimisations
-sub afh {
- open(++$f, '>&STDOUT') or die;
- select select $f;
- my $r = *{$f}{IO};
- delete $X::{$f};
- bless $r;
-}
+sub afh { select select ++$f; my $r = *{$f}{IO}; delete $X::{$f}; bless $r }
sub DESTROY { print "destroyed\n" }
package main;
$x = any X; # to bump sv_objcount. IO objs aren't counted??