From: janw Date: Wed, 11 Mar 2009 12:45:11 +0000 (+0000) Subject: Merged changeset:13526 from gosa-lhm. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3111de6524962aff570605992a877613663f129f;p=gosa.git Merged changeset:13526 from gosa-lhm. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13527 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index 8043358cc..2b0c4c1a4 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -28,7 +28,7 @@ use Getopt::Long; use Config::IniFiles; use POSIX; -use Fcntl; +use Fcntl qw/:flock/; use IO::Socket::INET; use IO::Handle; use IO::Select; @@ -350,7 +350,10 @@ sub daemon_log { my $name = $prg; my $log_msg = "$month $monthday $hours:$minutes:$seconds $name $msg\n"; + flock(LOG_HANDLE, LOCK_EX); + seek(LOG_HANDLE, 0, 2); print LOG_HANDLE $log_msg; + flock(LOG_HANDLE, LOCK_UN); if( $foreground ) { print STDERR $log_msg; }