X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids.git;a=blobdiff_plain;f=src%2Fshared%2Fwait_op.c;h=53bc664ab8282834dcc1eea770a00dcdcfdb913c;hp=3e98d05eede0be3bb50655a448939d9a683d1c1e;hb=6ef2f786c6c8ead94841b5f93baf9f43421f08c8;hpb=301048b51990573e58a30dc4a5bb4ec285cad554 diff --git a/src/shared/wait_op.c b/src/shared/wait_op.c index 3e98d05..53bc664 100755 --- a/src/shared/wait_op.c +++ b/src/shared/wait_op.c @@ -1,4 +1,5 @@ -/* @(#) $Id$ */ +/* @(#) $Id: ./src/shared/wait_op.c, 2011/09/08 dcid Exp $ + */ /* Copyright (C) 2009 Trend Micro Inc. * All rights reserved. @@ -23,7 +24,7 @@ void os_setwait() /* For same threads. */ __wait_lock = 1; - + if(isChroot()) { fp = fopen(WAIT_FILE, "w"); @@ -47,7 +48,7 @@ void os_setwait() void os_delwait() { __wait_lock = 0; - + if(isChroot()) { unlink(WAIT_FILE); @@ -65,7 +66,7 @@ void os_delwait() * Works as a simple inter process lock (only the main * process is allowed to lock). */ -#ifdef WIN32 +#ifdef WIN32 void os_wait() { if(!__wait_lock) @@ -94,7 +95,7 @@ void os_wait() void os_wait() { struct stat file_status; - + /* If the wait file is not present, keep going. */ @@ -108,7 +109,7 @@ void os_wait() if(stat(WAIT_FILE_PATH, &file_status) == -1) return; } - + /* Wait until the lock is gone. */ verbose(WAITING_MSG, __local_name);