This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Uninitialized tmbuf.
[perl5.git] / t / io / eintr.t
index 90fce80..9ea9cc7 100644 (file)
@@ -40,44 +40,25 @@ if (exists $ENV{PERLIO} && $ENV{PERLIO} =~ /stdio/  ) {
        exit 0;
 }
 
-# Determine whether this platform seems to support interruptible syscalls.
-#
 # on Win32, alarm() won't interrupt the read/write call.
 # Similar issues with VMS.
 # On FreeBSD, writes to pipes of 8192 bytes or more use a mechanism
 # that is not interruptible (see perl #85842 and #84688).
 # "close during print" also hangs on Solaris 8 (but not 10 or 11).
-
-{
-       my $pipe;
-       my $pid = eval { open($pipe, '-|') };
-       unless (defined $pid) {
-               skip_all("can't do -| open");
-               exit 0;
-       }
-       unless ($pid) {
-               #child
-               sleep 3;
-               close $pipe;
-               exit 0;
-       }
-
-       # parent
-
-       my $intr = 0;
-       $SIG{ALRM} = sub { $intr = 1 };
-       alarm(1);
-
-       my $x = <$pipe>;
-
-       unless ($intr) {
-               skip_all("reads aren't interruptible");
-               exit 0;
-       }
-       alarm(0);
+#
+# Also skip on release builds, to avoid other possibly problematic
+# platforms
+
+my ($osmajmin) = $Config{osvers} =~ /^(\d+\.\d+)/;
+if ($^O eq 'VMS' || $^O eq 'MSWin32' || $^O eq 'cygwin' || $^O =~ /freebsd/ || $^O eq 'midnightbsd' ||
+     ($^O eq 'solaris' && $Config{osvers} eq '2.8') || $^O eq 'nto' ||
+     ($^O eq 'darwin' && $osmajmin < 9) ||
+    ((int($]*1000) & 1) == 0)
+) {
+       skip_all('various portability issues');
+       exit 0;
 }
 
-
 my ($in, $out, $st, $sigst, $buf);
 
 plan(tests => 10);