Hi !

I do not say that this is a bug, ok?
It's just not compatible with old mod_perl :)

While porting PApp (http://papp.plan9.de)
to mod_perl-1.99_12 I noted that internal_redirect
is not compatible with old mod_perl for a special case:

If STDOUT is crippled mod_perl-1.99_12 dies,
while 1.2x does not:

modperl_io.c:
    /* open my $oldout, ">&STDOUT" or die "Can't dup STDOUT: $!"; */
    status = Perl_do_open(aTHX_ handle_save, ">&STDOUT", 8, FALSE, O_WRONLY,
                          0, Nullfp);
    if (status == 0) {
        Perl_croak(aTHX_ "Failed to dup STDOUT: %_", get_sv("!", TRUE));
    }


I work-arrounded the Problem in PApp in an ugly way:
(we overload "$r") to emulate 1.2x:

use POSIX qw(dup2);
sub internal_redirect {
   my $self = shift;
   dup2(2,1);
   untie *STDOUT; open STDOUT, ">&1";
   $self->SUPER::internal_redirect(@_);
}

-- 

  ciao - 
    Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to