]> git.ipfire.org Git - people/stevee/guardian.git/commitdiff
Drop function for fileposition initialization.
authorStefan Schantl <stefan.schantl@ipfire.org>
Wed, 25 Nov 2015 08:06:46 +0000 (09:06 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Wed, 25 Nov 2015 08:06:46 +0000 (09:06 +0100)
This function has been moved to the "Base" module.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
guardian

index c72a9dcfba993261327a19213cca41c829b952a4..fd16b3a6fd49b476cfde440dc16de30197e21eb1 100644 (file)
--- a/guardian
+++ b/guardian
@@ -247,35 +247,6 @@ sub Socket () {
        }
 }
 
-#
-## Function for fileposition initialization.
-#
-## This function is used to get the cursor position of the end of file (EOF) of
-## a specified file.
-#
-## In order to prevent from permanently read and keep files opened, or dealing
-## with huge logfiles, at initialization time of the worker processes, the file will
-## be opened once and the cursor position of the end of file (EOF) get stored.
-#
-sub Init_fileposition ($) {
-       my $file = $_[0];
-
-       # Open the file.
-       open(FILE, $file) or die "Could not open $file. $!\n";
-
-       # Just seek to the end of the file (EOF).
-       seek(FILE, 0, 2);
-
-       # Get and store the position.
-       my $position = tell(FILE),
-
-       # Close the file again.
-       close(FILE);
-
-       # Return the position.
-       return $position;
-}
-
 #
 ## Function for capturing process signals.
 #