Steve Hay wrote:
Randy Kobes wrote:

Also, I just tried a long run (with the above change to
modperl_io.c), and now I do get a (seemingly) random
failure, but the error message is
Failed to dup STDOUT: Permission denied
and not STDIN. Not sure if this is progress ...


I've rebuilt with Randy's revised IPC::Run3 patch for TestSmoke.pm (using undef instead of \undef), plus his patch to TestServer.pm, plus Stas' and my tweaks to modperl_io.c (changing ">&STDIN", 8 to "<&STDIN", 7). I think that's the current state of affairs. (And I didn't apply Randy's change to modperl_io.c that changed "<:Apache", 8 to "<:Apache", 7 ;-)

It looks like the revision to the IPC::Run3 patch may have improved things slightly (?) because I now get the same error reported above by Randy every time:

Failed to dup STDOUT: Permission denied.

and no longer see any errors about STDIN.

Again the error occurs on a random test and crashes the Apache server.

Hunting around for possible causes I thought that these two lines in modperl_io.c's modperl_io_perlio_override_stdout():

   status = Perl_do_open(aTHX_ handle_save, ">&STDOUT", 8, FALSE, O_RDONLY,
   status = Perl_do_open9(aTHX_ handle, ">:Apache", 8, FALSE, O_RDONLY,

should perhaps be:

   status = Perl_do_open(aTHX_ handle_save, ">&STDOUT", 8, FALSE, O_WRONLY,
   status = Perl_do_open9(aTHX_ handle, ">:Apache", 8, FALSE, O_WRONLY,

That sounds again as yet another copy-n-paste error. You are definitely correct. Though it seems that any of these problems totally unaffecting because we are in the dup mode. I'll commit your fix shortly.


In any case, can we single out that IPC::Run3 causes this problem? Randy were you able to reproduce this problem with your original patch that uses Win32::Process.

If that's the case with IPC::Run3, we should try again with standalone perl test script which dups STDOUT/STDIN and uses run3 to to spawn some external program that reads from STDIN and writes to STDOUT. If find such a test that reproduces the problem, besides having Barrie fixing it, he will have a good test to include in the IPC::Run3 tests suite ;)


__________________________________________________________________ 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]



Reply via email to