summaryrefslogtreecommitdiff
path: root/ext/IO/t/io_multihomed.t
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2006-04-02 13:07:19 +0200
committerSteve Hay <SteveHay@planit.com>2006-04-04 10:34:10 +0000
commit2f78ce11bc4a9355ade5d20a0825b10fbb177169 (patch)
treeeb9806fad7f01880cbb7f994452ad1e6bf90db3c /ext/IO/t/io_multihomed.t
parent6b4ce6c8aaed4a52bfca44a2e7fa0e1adbf47887 (diff)
downloadperl-2f78ce11bc4a9355ade5d20a0825b10fbb177169.tar.gz
Re: Making IO::Socket pass test on Win32
Message-ID: <9b18b3110604020107o6a0b594cwfc2344a172c360b0@mail.gmail.com> plus extra $Config{d_fork} changes to io_pipe.t and io_multihomed.t p4raw-id: //depot/perl@27710
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";