From 2b09c5a862431f9c94739bfc685cb244ce050f6c Mon Sep 17 00:00:00 2001 From: Steve Hay Date: Thu, 7 Dec 2006 12:34:10 +0000 Subject: [PATCH] Make use of $Config{d_pseudofork} in a couple of core tests 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 | 7 ++----- t/op/fork.t | 7 +------ 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/ext/Socket/t/socketpair.t b/ext/Socket/t/socketpair.t index 95d424a..e272997 100644 --- a/ext/Socket/t/socketpair.t +++ b/ext/Socket/t/socketpair.t @@ -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. diff --git a/t/op/fork.t b/t/op/fork.t index b344990..2d6232e 100755 --- a/t/op/fork.t +++ b/t/op/fork.t @@ -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; } -- 2.7.4