stas        2003/10/14 17:10:44

  Modified:    src/modules/perl modperl_io.c
  Log:
  must close the dupped filehandles, so they won't be attempted to flush when
  r goes out of scope
  
  Revision  Changes    Path
  1.15      +2 -0      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.14
  retrieving revision 1.15
  diff -u -u -r1.14 -r1.15
  --- modperl_io.c      3 Oct 2003 17:45:23 -0000       1.14
  +++ modperl_io.c      15 Oct 2003 00:10:43 -0000      1.15
  @@ -169,6 +169,7 @@
       /* open STDIN, "<&STDIN_SAVED" or die "Can't dup STDIN_SAVED: $!"; */
       status = Perl_do_open9(aTHX_ handle_orig, "<&", 2, FALSE, O_RDONLY,
                              0, Nullfp, (SV*)handle, 1);
  +    Perl_do_close(aTHX_ handle, FALSE);
       if (status == 0) {
           Perl_croak(aTHX_ "Failed to restore STDIN: %_", get_sv("!", TRUE));
       }
  @@ -190,6 +191,7 @@
       /* open STDOUT, ">&STDOUT_SAVED" or die "Can't dup STDOUT_SAVED: $!"; */
       status = Perl_do_open9(aTHX_ handle_orig, ">&", 2, FALSE, O_WRONLY,
                              0, Nullfp, (SV*)handle, 1);
  +    Perl_do_close(aTHX_ handle, FALSE);
       if (status == 0) {
           Perl_croak(aTHX_ "Failed to restore STDOUT: %_", get_sv("!", TRUE));
       }
  
  
  

Reply via email to