Warning: I'm perl and CGI beginner so this can be stupid question.
I write a really simple perl script which should get info about open files and running processes on system. There is something like this function for processes:
sub num_processes() {
my @lines = `/bin/ps -ef`;
return scalar @lines;
}
If I run it from bash, it returns all running processes on system but when I run it via apache and CGI it retruns only 2 processes (running script and running 'ps -ef'). This CGI script runs under user with shell (/bin/bash) enabled. Is there any posibility how to get all the processes via apache and CGI?
num_processesreturns size of@linesarray?