summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 76ecd81)
raw | patch | inline | side by side (parent: 76ecd81)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 11 Mar 2009 12:43:53 +0000 (12:43 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 11 Mar 2009 12:43:53 +0000 (12:43 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@13526 594d385d-05f5-0310-b6e9-bd551577e9d8
trunk/gosa-si/gosa-si-server | patch | blob | history |
index 9191d3e858a580cc590816c1af73351ee606f9e7..d13b4212d51357cd98b92a388f633224541a5293 100755 (executable)
use Config::IniFiles;
use POSIX;
-use Fcntl;
+use Fcntl qw/:flock/;
use IO::Socket::INET;
use IO::Handle;
use IO::Select;
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;
}