when $writeCounter gets to 1342, the program dies on writing with the error: "can't write to save Inappropriate ioctl for device" i'm sorry i can't really give a condensed version of the code since this is part of a very large program. i added the flocks just to ensure that nothing is trying to open the file at the same time, its possible that i'm not using these correctly, though i was having this error before i included these. can anyone see any obvious flaws?print STDERR "saving block $writeCounter, \@ docID $docID "; system("date"); my $postingList = ''; my $posting = ''; my $output = ''; my $savename = "/indexes/1_indexBlock_$writeCounter"; print STDERR "saving $savename\n"; open my $save, ">.$savename" or die "can't open save $!\n"; flock($save, 2) or die "can't lock save $!\n"; print STDERR "$savename is open\n"; foreach my $x (sort (keys %inMemIndex)) { $postingList = $inMemIndex{$x}; $posting = "$x $inMemIndex{$x}\n"; $output .= $posting; } print $save $output or die "can't write to save $!\n"; $output = ''; %inMemIndex = (); flock($save, 8); close $save or die "can't close save $!\n"; system("./logMergeManager.pl $writeCounter &"); $writeCounter++; $totalWordSize = 0;
In reply to Inappropriate ioctl for device by downer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |