Using IPC::open2 under mod_perl

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top