Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

illegal seek when running a perl program from inside a perl program

Status
Not open for further replies.

damonh78

Programmer
Jul 28, 2005
44
IE
Hi,

I have a perl program (report.pl) which when run simply collates a bunch of information from a log file. This program runs fine when run from the command line (I am running it on different unix systems). My problem is that when I try to run this from inside a different perl program (summary.pl) I get an error complaining of an illegal seek.
Any help with this problem would be greatly appreciated. Also what exactly is an illegal seek anyways?

John

Here is the error message that I receive:

[Summary.pl WARNING] Error while executing perl /view/bin/report.pl --htmldir TestSummary tests.log -Illegal seek - Error code : 256 - 1
main::GatherTestsInfo() called at /view/scripts/Summary.pl line 133
main::main() called at /view//scripts/General/Summary.pl line 95

And here is the piece of code for calling report.pl:

# Run report script in each of those directory
foreach my $log_dir (@dir_list) {
chdir($log_dir) or die("[Summary.pl ERROR] Failed to cd into $log_dir");
my $cmd = "perl $report_script --htmldir $sum_dir $log";

system($cmd);
($? >> 8) && warn("[Summary.pl WARNING] Error while executing $cmd - $! - Error code : $? - ",$? >> 8," -\n"
);
}

 
What does report.pl do?
Do you use seek, or stdin in your program?

--Paul

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
are you running summary.pl on the command line or under HTTP, and is it the same user as report.pl?



---
cheers!
san
smoking3vc.gif


print length "The answer to life, universe & everything!
 
Hi,

sorry wasnt in work yesterday. To answer all questions.
Yes I am running summary.pl from the command line and yes it is the same user running both scripts.
Report.pl pulls information from various disparate logfiles and creates html pages showing the results of the log files. No I dont use seek or stdin, but I do switch between different other filehandles.

Regards,

John
 
print $log_dir in the foreach loop and see what it's value is:

Code:
 foreach my $log_dir (@dir_list) {
     print "$log_dir\n";
     #rest of your code
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top