summaryrefslogtreecommitdiff
path: root/ext/IO/t/io_multihomed.t
diff options
context:
space:
mode:
Diffstat (limited to 'ext/IO/t/io_multihomed.t')
-rw-r--r--ext/IO/t/io_multihomed.t11
1 files changed, 9 insertions, 2 deletions
diff --git a/ext/IO/t/io_multihomed.t b/ext/IO/t/io_multihomed.t
index 3c8c4a6723..d9355cf424 100644
--- a/ext/IO/t/io_multihomed.t
+++ b/ext/IO/t/io_multihomed.t
@@ -17,8 +17,15 @@ BEGIN {
elsif ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bIO\b/) {
$reason = 'IO extension unavailable';
}
- elsif (! $Config{'d_fork'}) {
- $reason = 'no fork';
+ elsif (
+ ! eval {
+ my $pid= fork();
+ ! defined($pid) and die "Fork failed!";
+ ! $pid and exit;
+ defined waitpid($pid, 0);
+ }
+ ) {
+ $reason = "no fork: $@";
}
if ($reason) {
print "1..0 # Skip: $reason\n";