Commit | Line | Data |
---|---|---|
34f7f30d | 1 | use strict; |
2 | use Config qw(%Config); | |
3 | use Test; | |
4 | use Win32; | |
5 | ||
6 | unless ($Config{ccflags} =~ /PERL_IMPLICIT_SYS/) { | |
7 | print "1..0 # Skip: Test requires fork emulation\n"; | |
8 | exit 0; | |
9 | } | |
10 | ||
11 | plan tests => 1; | |
12 | ||
13 | if (my $pid = fork) { | |
14 | waitpid($pid, 0); | |
15 | exit 0; | |
16 | } | |
17 | ||
18 | # This test relies on the implementation detail that the fork() emulation | |
19 | # uses the negative value of the thread id as a pseudo process id. | |
20 | ok(-$$, Win32::GetCurrentThreadId()); |