[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.9.6-234-gba49022

Chia-liang Kao clkao at bestpractical.com
Tue Nov 30 06:31:26 EST 2010


The branch, 3.9-trunk has been updated
       via  ba4902287ff010bbe91b78e1bd12aca53e269a65 (commit)
       via  302c9195af4f3148d4120528a49dcedebfdf2f9c (commit)
       via  9b8baf5b51723fdbaa17c770d0dc795d285e2e44 (commit)
       via  7e3d19933be5212f3724a440b9139c60e94ced46 (commit)
       via  a6711ec0cde3e55b3a17311b29a6221fdebfbc20 (commit)
       via  00ed3adff315710d067192381ca3971b3efe4d7d (commit)
       via  e1c6d4a8cf29bccdc3e37022ddbf67ee9cbfbb63 (commit)
      from  d9379418fe0feb08f8446d89fac789ea9bebab3f (commit)

Summary of changes:
 Makefile.in                     |   23 +----
 bin/fastcgi_server.in           |  234 ------------------------------------
 bin/mason_handler.fcgi.in       |   72 -----------
 bin/mason_handler.scgi.in       |   61 ----------
 bin/mason_handler.svc.in        |  251 ---------------------------------------
 bin/webmux.pl.in                |  174 ---------------------------
 configure.ac                    |   25 +----
 docs/web_deployment.pod         |    5 +
 lib/RT/Graph/Tickets.pm         |    4 -
 lib/RT/Interface/Web/Handler.pm |  141 ----------------------
 lib/RT/Interface/Web/Request.pm |   42 +------
 lib/RT/Util.pm                  |   31 +----
 sbin/rt-test-dependencies.in    |   36 +-----
 share/html/NoAuth/js/dhandler   |    8 --
 share/html/index.html           |    2 +-
 15 files changed, 25 insertions(+), 1084 deletions(-)
 delete mode 100644 bin/fastcgi_server.in
 delete mode 100755 bin/mason_handler.fcgi.in
 delete mode 100755 bin/mason_handler.scgi.in
 delete mode 100755 bin/mason_handler.svc.in
 delete mode 100755 bin/webmux.pl.in

- Log -----------------------------------------------------------------
commit 302c9195af4f3148d4120528a49dcedebfdf2f9c
Merge: d937941 9b8baf5
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Tue Nov 30 18:37:08 2010 +0800

    Merge branch 'webmux-removal' into 3.9-trunk


commit ba4902287ff010bbe91b78e1bd12aca53e269a65
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Tue Nov 30 19:29:49 2010 +0800

    remove the IPC::Run::SafeHandles hack and a like.
    
    Since we are now under CGI::Emulate::PSGI, stdin is again a normal GLOB, not FCGI::Stream under FCGI.

diff --git a/lib/RT/Graph/Tickets.pm b/lib/RT/Graph/Tickets.pm
index 1f6ca92..21103f4 100644
--- a/lib/RT/Graph/Tickets.pm
+++ b/lib/RT/Graph/Tickets.pm
@@ -58,10 +58,6 @@ RT::Graph::Tickets - view relations between tickets as graphs
 =cut
 
 unless ($RT::DisableGraphViz) {
-    require IPC::Run;
-    IPC::Run->import;
-    require IPC::Run::SafeHandles;
-    IPC::Run::SafeHandles->import;
     require GraphViz;
     GraphViz->import;
 }
diff --git a/lib/RT/Util.pm b/lib/RT/Util.pm
index bad86f9..b389d18 100644
--- a/lib/RT/Util.pm
+++ b/lib/RT/Util.pm
@@ -71,12 +71,14 @@ sub safe_run_child (&) {
     my @res;
     my $want = wantarray;
     eval {
+        my $code = shift;
+        local @ENV{ 'LANG', 'LC_ALL' } = ( 'C', 'C' );
         unless ( defined $want ) {
-            _safe_run_child( @_ );
+            $code->();
         } elsif ( $want ) {
-            @res = _safe_run_child( @_ );
+            $code->();
         } else {
-            @res = ( scalar _safe_run_child( @_ ) );
+            $code->();
         }
         1;
     } or do {
@@ -93,29 +95,6 @@ sub safe_run_child (&) {
     return $want? (@res) : $res[0];
 }
 
-sub _safe_run_child {
-    local @ENV{ 'LANG', 'LC_ALL' } = ( 'C', 'C' );
-
-    return shift->() if $ENV{'MOD_PERL'} || $CGI::SpeedyCGI::i_am_speedy;
-
-    # We need to reopen stdout temporarily, because in FCGI
-    # environment, stdout is tied to FCGI::Stream, and the child
-    # of the run3 wouldn't be able to reopen STDOUT properly.
-    my $stdin = IO::Handle->new;
-    $stdin->fdopen( 0, 'r' );
-    local *STDIN = $stdin;
-
-    my $stdout = IO::Handle->new;
-    $stdout->fdopen( 1, 'w' );
-    local *STDOUT = $stdout;
-
-    my $stderr = IO::Handle->new;
-    $stderr->fdopen( 2, 'w' );
-    local *STDERR = $stderr;
-
-    return shift->();
-}
-
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/sbin/rt-test-dependencies.in b/sbin/rt-test-dependencies.in
index 75c6781..22ab13d 100755
--- a/sbin/rt-test-dependencies.in
+++ b/sbin/rt-test-dependencies.in
@@ -333,7 +333,6 @@ MIME::Types
 $deps{'GRAPHVIZ'} = [ text_to_hash( << '.') ];
 GraphViz
 IPC::Run
-IPC::Run::SafeHandles
 .
 
 $deps{'GD'} = [ text_to_hash( << '.') ];
diff --git a/share/html/NoAuth/js/dhandler b/share/html/NoAuth/js/dhandler
index 2ae66e7..2a16e21 100644
--- a/share/html/NoAuth/js/dhandler
+++ b/share/html/NoAuth/js/dhandler
@@ -69,14 +69,6 @@ if ( $arg =~ m{squished\.js$} ) {
             my $input = $content;
             my ( $output, $error );
 
-            my $stdout = IO::Handle->new;
-            $stdout->fdopen( 1, 'w' );
-            local *STDOUT = $stdout;
-
-            my $stderr = IO::Handle->new;
-            $stderr->fdopen( 2, 'w' );
-            local *STDERR = $stderr;
-
             local $SIG{'CHLD'} = 'DEFAULT';
             require IPC::Run3;
             IPC::Run3::run3( [$jsmin], \$input, \$output, \$error );

-----------------------------------------------------------------------


More information about the Rt-commit mailing list