Re: Smoke [5.11.0] 33500 FAIL(F) MSWin32 WinXP/.Net SP2 (x86/2 cpu)
authorNicholas Clark <nick@ccl4.org>
Thu, 13 Mar 2008 12:47:51 +0000 (12:47 +0000)
committerSteve Hay <SteveHay@planit.com>
Wed, 19 Mar 2008 17:34:22 +0000 (17:34 +0000)
Message-ID: <20080313124751.GX79799@plum.flirble.org>

Fixes test failures introduced by #33480 in non-fork()-enabled builds.

p4raw-id: //depot/perl@33543

ext/Win32/t/GetCurrentThreadId.t

index 230431c..2e261bc 100644 (file)
@@ -5,14 +5,13 @@ use Win32;
 
 plan tests => 1;
 
-if (my $pid = fork) {
-    waitpid($pid, 0);
-    exit 0;
-}
-
 # This test relies on the implementation detail that the fork() emulation
 # uses the negative value of the thread id as a pseudo process id.
 if ($Config{ccflags} =~ /PERL_IMPLICIT_SYS/) {
+    if (my $pid = fork) {
+       waitpid($pid, 0);
+       exit 0;
+    }
     ok(-$$, Win32::GetCurrentThreadId());
 } else {
 # here we just want to see something.