I am not sure I understand what you are really asking. If all you want to do is execute 'servicectl stop' from within perl, you can just:
my $result=`servicectl stop`;
$result will contain any output it produces | [reply] [Watch: Dir/Any] [d/l] |
If you are using Linux platform, use the following suggestion.
You can generate a signal TERM to the parent process using kill function in Perl. If you want to restart the process, send a HUP signal.
Further more information please gone through here.
| [reply] [Watch: Dir/Any] |
Since Apache is available for Windows and Linux, which OS are you running?
If Linux is your current OS, what distribution?
If you're running Redhat, a simple system command using
service httpd stop
should be more than sufficient.
Unfortunately there are a lot of questions that must be answered before we can offer useful guidance.
| [reply] [Watch: Dir/Any] [d/l] |
I use apachectl on my Linux box, not servicectl to start/stop/restart the service. I am not familiar with the servicectl command, but I don't profess to know much. | [reply] [Watch: Dir/Any] |