Here some more of the script to give you an idea of what I'm doing:
#!/usr/local/bin/perl -w
use strict;
sub executeStream($);
$SIG{CHLD} = 'IGNORE';
# The glob below will work but the message detailed in my original pos
+t will occur.
my @fileList = glob("/mypath/*.log");
foreach my $logfile (@fileList)
{
print "Got logfile $logfile\n";
}
executeStream(1);
sub executeStream($)
{
my $childProcess;
unless (defined($childProcess = fork()))
{
die "Could not fork new child process.";
}
unless($childProcess)
{
# Child process so lets exec the loader.
exec("myprog " . $_[0])
or die "Could not exec FeedLoader.pl";
}
}