perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0/src/modules/perl modperl_io.c
Date Sun, 24 Aug 2003 19:37:29 GMT
stas        2003/08/24 12:37:29

  Modified:    src/modules/perl modperl_io.c
  Log:
  we need to check $!, not $@ on open();
  
  Revision  Changes    Path
  1.11      +6 -18     modperl-2.0/src/modules/perl/modperl_io.c
  
  Index: modperl_io.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_io.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- modperl_io.c	20 Aug 2003 23:20:14 -0000	1.10
  +++ modperl_io.c	24 Aug 2003 19:37:29 -0000	1.11
  @@ -102,9 +102,7 @@
       status = Perl_do_open(aTHX_ handle_save, ">&STDIN", 8, FALSE, O_RDONLY,
                             0, Nullfp);
       if (status == 0) {
  -        STRLEN n_a;
  -        Perl_croak(aTHX_ "Failed to dup STDIN: %s",
  -                   SvTRUE(ERRSV) ? SvPV(ERRSV, n_a) : "unknown error");
  +        Perl_croak(aTHX_ "Failed to dup STDIN: %_", get_sv("!", TRUE));
       }
   
       /* similar to PerlIO::scalar, the PerlIO::Apache layer doesn't
  @@ -114,9 +112,7 @@
       status = Perl_do_open9(aTHX_ handle, "<:Apache", 8, FALSE, O_RDONLY,
                              0, Nullfp, sv, 1);
       if (status == 0) {
  -        STRLEN n_a;
  -        Perl_croak(aTHX_ "Failed to open STDIN: %s",
  -                   SvTRUE(ERRSV) ? SvPV(ERRSV, n_a) : "unknown error");
  +        Perl_croak(aTHX_ "Failed to open STDIN: %_", get_sv("!", TRUE));
       }
   
       MP_TRACE_o(MP_FUNC, "end\n");
  @@ -140,9 +136,7 @@
       status = Perl_do_open(aTHX_ handle_save, ">&STDOUT", 8, FALSE, O_RDONLY,
                             0, Nullfp);
       if (status == 0) {
  -        STRLEN n_a;
  -        Perl_croak(aTHX_ "Failed to dup STDOUT: %s",
  -                   SvTRUE(ERRSV) ? SvPV(ERRSV, n_a) : "unknown error");
  +        Perl_croak(aTHX_ "Failed to dup STDOUT: %_", get_sv("!", TRUE));
       }
   
       /* similar to PerlIO::scalar, the PerlIO::Apache layer doesn't
  @@ -152,9 +146,7 @@
       status = Perl_do_open9(aTHX_ handle, ">:Apache", 8, FALSE, O_RDONLY,
                              0, Nullfp, sv, 1);
       if (status == 0) {
  -        STRLEN n_a;
  -        Perl_croak(aTHX_ "Failed to open STDOUT: %s",
  -                   SvTRUE(ERRSV) ? SvPV(ERRSV, n_a) : "unknown error");
  +        Perl_croak(aTHX_ "Failed to open STDOUT: %_", get_sv("!", TRUE));
       }
   
       MP_TRACE_o(MP_FUNC, "end\n");
  @@ -178,9 +170,7 @@
       status = Perl_do_open9(aTHX_ handle_orig, "<&", 2, FALSE, O_RDONLY,
                              0, Nullfp, (SV*)handle, 1);
       if (status == 0) {
  -        STRLEN n_a;
  -        Perl_croak(aTHX_ "Failed to restore STDIN: %s",
  -                   SvTRUE(ERRSV) ? SvPV(ERRSV, n_a) : "unknown error");
  +        Perl_croak(aTHX_ "Failed to restore STDIN: %_", get_sv("!", TRUE));
       }
   
       IoFLUSH_off(handle); /* STDIN's $|=0 */
  @@ -201,9 +191,7 @@
       status = Perl_do_open9(aTHX_ handle_orig, ">&", 2, FALSE, O_RDONLY,
                              0, Nullfp, (SV*)handle, 1);
       if (status == 0) {
  -        STRLEN n_a;
  -        Perl_croak(aTHX_ "Failed to restore STDOUT: %s",
  -                   SvTRUE(ERRSV) ? SvPV(ERRSV, n_a) : "unknown error");
  +        Perl_croak(aTHX_ "Failed to restore STDOUT: %_", get_sv("!", TRUE));
       }
   
       MP_TRACE_o(MP_FUNC, "end\n");
  
  
  

Mime
View raw message