3 # Tests if $$ and getppid return consistent values across threads
17 if (!$Config{useithreads}) {
18 print "1..0 # Skip: no ithreads\n";
21 if (!$Config{d_getppid}) {
22 print "1..0 # Skip: no getppid\n";
30 my ($pid, $ppid) = ($$, getppid());
31 my $pid2 : shared = 0;
32 my $ppid2 : shared = 0;
34 new threads( sub { ($pid2, $ppid2) = ($$, getppid()); } ) -> join();
36 is($pid, $pid2, 'pids');
37 is($ppid, $ppid2, 'ppids');