A
Antonio
Hi mod_perl gurus,
the following piece of code works well under a normal cgi:
local(*META, *HIS_IN); # Create local handles if needed.
$childpid = open2(\*META, \*HIS_IN, $queryString)
or print STDERR "can't open pipe $queryString $!";
while ($line=<META>){
....
}
close(META);
close(HIS_IN);
waitpid($childpid, 0);
But it fails under mod_perl Apache/2.0.49 (Unix) mod_perl/1.99_13
Perl/v5.8.0
I'm not able to see any output from the open2ed command.
Any help will be appreciated.
PS: the original problem is that using open ("command |") the command
remains appended as zombie. So i'm trying to switch to open2 for
accessing waitpid.
Any alternative solution?
the following piece of code works well under a normal cgi:
local(*META, *HIS_IN); # Create local handles if needed.
$childpid = open2(\*META, \*HIS_IN, $queryString)
or print STDERR "can't open pipe $queryString $!";
while ($line=<META>){
....
}
close(META);
close(HIS_IN);
waitpid($childpid, 0);
But it fails under mod_perl Apache/2.0.49 (Unix) mod_perl/1.99_13
Perl/v5.8.0
I'm not able to see any output from the open2ed command.
Any help will be appreciated.
PS: the original problem is that using open ("command |") the command
remains appended as zombie. So i'm trying to switch to open2 for
accessing waitpid.
Any alternative solution?