BTW, Why is it ">&STDIN"? I would have thought "<&STDIN" makes more sense. Anyway, I tried rebuilding everything with "<&STDIN" and it made no difference - testsuite OK, smoke NOT OK.
Another good catch, I've committed the fix. Thank you, Steve.
Can you reproduce this problem outside t/SMOKE? You should be able to by doing:
t/TEST -start t/TEST -run modperl\cookie t/TEST -stop
since that's what t/SMOKE does
No - I tried that half a dozen or more times, and it worked fine every time, with or without your patch.
The last failure that I had (with your patch in place) was on only the second test that it tried, so I tried running them both like this:
perl t/TEST -start perl t/TEST filter\out_str_req_mix perl t/TEST modperl\env perl t/TEST -stop
to try and reproduce what the SMOKE had actually done, but that worked too!
So is it possible that the bug comes from perl? This randomness is troubling. (Did you have some magnetic storms in England recently? ;)
Funny you should mention that - the weather has just taken a turn for the worse!
Hope that the problem will disappear as the sun will come out ;)
can you write a plain perl script that does:
open my $oldout, ">&STDIN" or die "Can't dup STDIN: $!";
then restores it and then re-opens again? and try to run it several times (outside modperl)?
Is this the sort of thing you had in mind?:-
Yup.
===== use strict; use warnings; for (1 .. 100) { open my $oldin, "<&STDIN" or die "Can't dup STDIN: $!"; close STDIN; printf "Dupped STDIN as fileno %d\n", fileno $oldin; open STDIN, "<&", $oldin or die "Can't restore STDIN: $!"; close $oldin; printf "Restored STDIN as fileno %d\n", fileno STDIN; } =====
I've called the variable $oldin rather than $oldout, and used "<" rather than ">". (Otherwise Perl warns "Filehandle STDIN reopened as STDIN only for output" when restoring STDIN.)
The above runs fine using the same Perl (5.8.1) that I'm running mod_perl-1.99_10 with. (It also works OK with ">" instead of "<" aside from the warnings from Perl.)
Thanks, it's probably more involved than this then.
I'm thinking that you may get this error if STDIN was already closed before it was attempted to be dupped. If only you could reliably reproduce the problem.
Another peculiar thing about this problem is that Randy doesn't seem to have this problem. Can you try and compare your environments/builds and see why it's only you who gets it?
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]