From f7821b2361477128f27c8ff6838b47893b4482be Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Wed, 25 Nov 2015 09:06:46 +0100 Subject: [PATCH] Drop function for fileposition initialization. This function has been moved to the "Base" module. Signed-off-by: Stefan Schantl --- guardian | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/guardian b/guardian index c72a9dc..fd16b3a 100644 --- 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. # -- 2.39.5