N
Naren
I am trying to start multiple php processes from perl script ; can I
do the following?. It is failing to launch.
Appreciate all the help.
#!/usr/bin/perl
use strict;
use warnings;
my $count =0;
print localtime () . ": Hello from the parent ($$)!\n";
for ($count = 10; $count <= 100; $count = i+10) {
my $pid = fork;
die "Fork failed: $!" unless defined $pid;
unless ($pid) {
print localtime () . ": Hello from the child ($$)!\n";
exec "/opt/php/bin/php benchmark_mysql.php $count 150 >>
mysql_perf_cache_run$count.log"; # Some lon
g running process.
die "Exec failed: $!\n";
}
}
print localtime () . ": Goodbye from the parent ($$)!\n";
do the following?. It is failing to launch.
Appreciate all the help.
#!/usr/bin/perl
use strict;
use warnings;
my $count =0;
print localtime () . ": Hello from the parent ($$)!\n";
for ($count = 10; $count <= 100; $count = i+10) {
my $pid = fork;
die "Fork failed: $!" unless defined $pid;
unless ($pid) {
print localtime () . ": Hello from the child ($$)!\n";
exec "/opt/php/bin/php benchmark_mysql.php $count 150 >>
mysql_perf_cache_run$count.log"; # Some lon
g running process.
die "Exec failed: $!\n";
}
}
print localtime () . ": Goodbye from the parent ($$)!\n";