1#!./perl
2
3BEGIN {
4    chdir 't' if -d 't';
5    @INC = '../lib';
6    require "./test.pl";
7    require Config;
8    $Config::Config{d_pseudofork}
9        or skip_all("no pseudo-fork");
10    eval 'use Errno';
11    die $@ if $@ and !is_miniperl();
12}
13
14# [perl #77672] backticks capture text printed to stdout when working
15# with multiple threads on windows
16watchdog(20); # before the fix this would often lock up
17
18fresh_perl_like(<<'PERL', qr/\A[z\n]+\z/, {}, "popen and threads");
19if (!defined fork) { die "can't fork" }
20for(1..100) {
21  print "zzzzzzzzzzzzz\n";
22  my $r=`perl -v`;
23  print $r if($r=~/zzzzzzzzzzzzz/);
24}
25PERL
26
27done_testing();
28