-/* @(#) $Id: wait_op.c,v 1.5 2009/06/24 18:53:09 dcid Exp $ */
+/* @(#) $Id: ./src/shared/wait_op.c, 2011/09/08 dcid Exp $
+ */
/* Copyright (C) 2009 Trend Micro Inc.
* All rights reserved.
*
* This program is a free software; you can redistribute it
* and/or modify it under the terms of the GNU General Public
- * License (version 3) as published by the FSF - Free Software
+ * License (version 2) as published by the FSF - Free Software
* Foundation
*/
/* For same threads. */
__wait_lock = 1;
-
+
if(isChroot())
{
fp = fopen(WAIT_FILE, "w");
void os_delwait()
{
__wait_lock = 0;
-
+
if(isChroot())
{
unlink(WAIT_FILE);
* 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)
void os_wait()
{
struct stat file_status;
-
+
/* If the wait file is not present, keep going.
*/
if(stat(WAIT_FILE_PATH, &file_status) == -1)
return;
}
-
+
/* Wait until the lock is gone. */
verbose(WAITING_MSG, __local_name);