Change 18440 by rgs@rgs-home on 2003/01/04 16:31:31 Integrate change #18420 from maint-5.8: Mea culpa: the join() was the string join, not the ithreads join().
Affected files ... ... //depot/perl/ext/threads/t/join.t#4 integrate Differences ... ==== //depot/perl/ext/threads/t/join.t#4 (text) ==== Index: perl/ext/threads/t/join.t --- perl/ext/threads/t/join.t#3~18239~ Tue Dec 3 04:49:01 2002 +++ perl/ext/threads/t/join.t Sat Jan 4 08:31:31 2003 @@ -93,17 +93,19 @@ if ($^O eq 'linux') { # We parse ps output so this is OS-dependent. # First modify $0 in a subthread. - print "# 1a: \$0 = $0\n"; - join( threads->new( sub { - print "# 2a: \$0 = $0\n"; - $0 = "foobar"; - print "# 2b: \$0 = $0\n" } ) ); - print "# 1b: \$0 = $0\n"; - if (open PS, "ps -f |") { + print "# mainthread: \$0 = $0\n"; + threads->new( sub { + print "# subthread: \$0 = $0\n"; + $0 = "foobar"; + print "# subthread: \$0 = $0\n" } )->join; + print "# mainthread: \$0 = $0\n"; + print "# pid = $$\n"; + if (open PS, "ps -f |") { # Note: must work in (all) Linux(es). my $ok; while (<PS>) { - print "# $_"; - if (/^\S+\s+$$\s.+\sfoobar\s*$/) { + s/\s+$//; # there seems to be extra whitespace at the end by ps(1)? + print "# $_\n"; + if (/^\S+\s+$$\s.+\sfoobar$/) { $ok++; last; } End of Patch.