Stop t/op/fork.t relying on rand(). (Closes: #317843) [perl #53238] blead change 33749 From: David Dick Date: Tue, 22 Apr 2008 21:12:42 -0700 Subject: [PATCH] [perl #53238] Patch to stop t/op/fork.t relying on rand From: David Dick (via RT) Message-ID: p4raw-id: //depot/perl@33749 --- t/op/fork.t | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/t/op/fork.t b/t/op/fork.t index 7318449..a19b260 100755 --- a/t/op/fork.t +++ b/t/op/fork.t @@ -445,16 +445,14 @@ pipe(RDR,WTR) or die $!; my $pid = fork; die "fork: $!" if !defined $pid; if ($pid == 0) { - my $rand_child = rand; close RDR; - print WTR $rand_child, "\n"; + print WTR "STRING_FROM_CHILD\n"; close WTR; } else { - my $rand_parent = rand; close WTR; - chomp(my $rand_child = ); + chomp(my $string_from_child = ); close RDR; - print $rand_child ne $rand_parent, "\n"; + print $string_from_child eq "STRING_FROM_CHILD", "\n"; } EXPECT 1 -- 1.5.6.5