Make use of $Config{d_pseudofork} in a couple of core tests
authorSteve Hay <SteveHay@planit.com>
Thu, 7 Dec 2006 12:34:10 +0000 (12:34 +0000)
committerSteve Hay <SteveHay@planit.com>
Thu, 7 Dec 2006 12:34:10 +0000 (12:34 +0000)
Can't really use it in ext/IO/t/*.t and lib/Test/Simple/t/fork.t
because they are dual-lived modules and must work with older perls
that don't have d_pseudofork

p4raw-id: //depot/perl@29485

ext/Socket/t/socketpair.t
t/op/fork.t

index 95d424a..e272997 100644 (file)
@@ -8,16 +8,13 @@ BEGIN {
     chdir 't' if -d 't';
     @INC = '../lib';
     require Config; import Config;
-    $can_fork = $Config{'d_fork'}
-               || ($^O eq 'MSWin32' && $Config{useithreads}
-                   && $Config{ccflags} =~ /-DPERL_IMPLICIT_SYS\b/);
-
+    $can_fork = $Config{'d_fork'} || $Config{'d_pseudofork'};
 
     if ($^O eq "hpux" or $Config{'extensions'} !~ /\bSocket\b/ &&
         !(($^O eq 'VMS') && $Config{d_socket})) {
        print "1..0\n";
        exit 0;
-      }
+    }
 
     # Too many things in this test will hang forever if something is wrong,
     # so we need a self destruct timer. And IO can hang despite an alarm.
index b344990..2d6232e 100755 (executable)
@@ -6,12 +6,7 @@ BEGIN {
     chdir 't' if -d 't';
     @INC = '../lib';
     require Config; import Config;
-    unless ($Config{'d_fork'}
-           or (($^O eq 'MSWin32' || $^O eq 'NetWare') and $Config{useithreads}
-               and $Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/ 
-#               and !defined $Config{'useperlio'}
-               ))
-    {
+    unless ($Config{'d_fork'} or $Config{'d_pseudofork'}) {
        print "1..0 # Skip: no fork\n";
        exit 0;
     }