I have a web service that need to get "stuff" from the system and is
using the following subroutine to retrieve info.
sub systeminfo {
if (open(FROMADMIN,"-|")) { # parent
undef local $/;
my $rv = <FROMADMIN>; # get response
close FROMADMIN;
return $rv;
}
else {
unless (open STDERR, '>&STDOUT') {
print STDERR "can't dup STDERR to STDOUT: $!";
exit 1;
}
my($command,$stdin) = @_;
open(ADMIN,'|'. $command);
print ADMIN $stdin
if $stdin;
close ADMIN;
exit 0;
}
}
This works fine for command line exection and from cgi but fails in
modperl (apache 1x).
The problem is that the initial read pipe apparently fails to open
under modperl.
Is there a workaround for this? or am I just missing something
simple?
Michael
[EMAIL PROTECTED]
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html