R
Rene Scheibe
....what do you think about checking the number
of scripts (with a specific name) running by:
my $processname = 'script.pl';
my @log = split /\n+/, `ps ax`;
my $count = 0;
foreach (@log)
{
chomp;
if (/$processname/)
{
$count++;
}
}
Or is there a better solution?
I need this to check at startup of the script
if the max. number of instances i want to allow
is already reached and then to exit new
instances right after this test.
Thanks...
....Rene
of scripts (with a specific name) running by:
my $processname = 'script.pl';
my @log = split /\n+/, `ps ax`;
my $count = 0;
foreach (@log)
{
chomp;
if (/$processname/)
{
$count++;
}
}
Or is there a better solution?
I need this to check at startup of the script
if the max. number of instances i want to allow
is already reached and then to exit new
instances right after this test.
Thanks...
....Rene