From: Nicholas Clark <nick@ccl4.org>
Date: Thu, 13 Mar 2008 12:47:51 +0000 (+0000)
Subject: Re: Smoke [5.11.0] 33500 FAIL(F) MSWin32 WinXP/.Net SP2 (x86/2 cpu)
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c762d24b2c953a47d439fb0fc6f1b9966169fe00;p=p5sagit%2Fp5-mst-13.2.git

Re: Smoke [5.11.0] 33500 FAIL(F) MSWin32 WinXP/.Net SP2 (x86/2 cpu)
Message-ID: <20080313124751.GX79799@plum.flirble.org>

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

p4raw-id: //depot/perl@33543
---

diff --git a/ext/Win32/t/GetCurrentThreadId.t b/ext/Win32/t/GetCurrentThreadId.t
index 230431c..2e261bc 100644
--- a/ext/Win32/t/GetCurrentThreadId.t
+++ b/ext/Win32/t/GetCurrentThreadId.t
@@ -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.