New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patch to stop t/op/fork.t relying on rand #9299
Comments
From ddick@aapt.net.auCreated by ddick@aapt.net.aut/op/fork.t depends on rand behaving in a non-random fashion. After Perl Info
|
From ddick@aapt.net.auperl.patchdiff -Naur old/t/op/fork.t new/t/op/fork.t
--- old/t/op/fork.t 2003-10-03 04:35:14.000000000 +1000
+++ new/t/op/fork.t 2008-02-26 16:31:42.043818960 +1100
@@ -431,16 +431,14 @@
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 = <RDR>);
+ chomp(my $string_from_child = <RDR>);
close RDR;
- print $rand_child ne $rand_parent, "\n";
+ print $string_from_child eq "STRING_FROM_CHILD", "\n";
}
EXPECT
1
|
@rgs - Status changed from 'new' to 'resolved' |
From @rgs2008/4/23 via RT David Dick <perlbug-followup@perl.org>:
Thanks, applied. |
Migrated from rt.perl.org#53238 (status was 'resolved')
Searchable as RT53238$
The text was updated successfully, but these errors were encountered: