Using IPC::open2 under mod_perl
From: Antonio (gulli_at_di.unipi.it)
Date: 05/17/04
- Previous message: Joe Smith: "Re: Help: How could i know i have installed a certain perl modules"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 17 May 2004 05:11:21 -0700
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?
- Previous message: Joe Smith: "Re: Help: How could i know i have installed a certain perl modules"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|