perl: IPC::Open3 fails to open STDERR with FCGI -


i testing git::repository fcgi script. neither able create git object nor run git command using module. ipc::open3::open3 failing error:

not glob reference @ /usr/local/lib/perl/5.10.1/fcgi.pm line 125

i added cluck in fcgi::open() , warn in ipc::open3::xopen() , here got:

mod_fcgid: stderr: ipc::open3::xopen() called args: glob(0xe92360) <&=5  mod_fcgid: stderr: ipc::open3::xopen() called args: glob(0xe92438) >&=9  mod_fcgid: stderr: ipc::open3::xopen() called args: glob(0xe92498) >&=12  mod_fcgid: stderr: fcgi::open() called args: fcgi::stream=scalar(0x14e43f0) >&=12  mod_fcgid: stderr:  @ /usr/local/lib/perl/5.10.1/fcgi.pm line 125  mod_fcgid: stderr: \tfcgi::stream::open('fcgi::stream=scalar(0x14e43f0)', '>&=12') called @ /usr/share/perl/5.10/ipc/open3.pm line 67  mod_fcgid: stderr: \tipc::open3::xopen('glob(0xe92498)', '>&=12') called @ /usr/share/perl/5.10/ipc/open3.pm line 162  mod_fcgid: stderr:  mod_fcgid: stderr: \tipc::open3::_open3('open3', 'mymodule', 'glob(0x1a56078)', 'glob(0x1906738)', 'glob(0x12f5430)' , '/usr/bin/git', '--version') called @ /usr/share/perl/5.10/ipc/open3.pm line 233  mod_fcgid: stderr: \tipc::open3::open3('glob(0x1a56078)', 'glob(0x1906738)', 'glob(0x12f5430)', '/usr/bin/git', '--version') called @ /usr/local/lib/site_perl/mymodule.pm line 113 

fcgi::open() called when stderr opened. stdin , stdout doesn't reach fcgi::open(). looked @ ipc::open3 , failing:

if ($dad_rdr ne $dad_err) {     if ($dup_err) {         # have use fileno here because in 1 case         # i'm doing dup filehandle might reference         # (from special case above).         xopen \*stderr, ">&" . xfileno($dad_err)             if fileno(stderr) != xfileno($dad_err);     } else {         xclose $dad_err;         xopen \*stderr, ">&=" . fileno $kid_err;  # failing     } } else {     xopen \*stderr, ">&stdout" if fileno(stderr) != fileno(stdout); } 

i can replace open3 ipc::run::start , works fine. understand going wrong stderr here. bug fcgi.pm or open3.pm or doing wrong?

i running apache 2.2.16 libapache2-mod-fcgid 1:2.3.6, libfcgi-perl 0.71-1 , libcgi-fast-perl 5.10.1 on debian squeeze. perl version 5.10.1.

how reproduce:

use cgi::fast; use symbol (); use ipc::open3 qw(open3);  while (my $cgi = new cgi::fast) {     $pid;     $in  = symbol::gensym;     $out = symbol::gensym;     $err = symbol::gensym;          $pid = open3( $in, $out, $err, '/usr/bin/git', '--version');  } 

this should fixed in latest version (1.102) of system-command: https://metacpan.org/release/book/system-command-1.102 .

the patch https://github.com/book/system-command/commit/d5009728cc66e5f9bb2057df4be70648571a29cd


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -