diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-01-09 09:58:17 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-01-09 09:58:17 +0000 |
commit | 850d607338c285d0f6a7d66f1c4baf08de921004 (patch) | |
tree | 346fb7f013796a40e11a43fed25213c3b34cd957 | |
parent | 19908982fd40a3fcda3d18abed628060f59f2819 (diff) | |
download | perl-850d607338c285d0f6a7d66f1c4baf08de921004.tar.gz |
socketpair.t was written in 2001. At that time, Test::More got confused
if you forked under it. Test::More 0.47 added support to detect forking
which resolves this. Hence there is now no need to fork() in a BEGIN
block, which causes issues on Win32 due to how pseudofork works.
p4raw-id: //depot/perl@29729
-rw-r--r-- | ext/Socket/t/socketpair.t | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/Socket/t/socketpair.t b/ext/Socket/t/socketpair.t index e272997d58..03cb5a42b7 100644 --- a/ext/Socket/t/socketpair.t +++ b/ext/Socket/t/socketpair.t @@ -15,13 +15,15 @@ BEGIN { print "1..0\n"; exit 0; } +} + +{ + # This was in the BEGIN block, but since Test::More 0.47 added support to + # detect forking, we don't need to fork before Test::More initialises. # 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. - # This is convoluted, but we must fork before Test::More, else child's - # Test::More thinks that it ran no tests, and prints a message to that - # effect if( $can_fork) { my $parent = $$; $child = fork; |