X-Git-Url: https://gapil.gnulinux.it/gitweb/?p=gapil.git;a=blobdiff_plain;f=sources%2FLockFile.c;fp=sources%2FLockFile.c;h=0000000000000000000000000000000000000000;hp=5fe7c3b7099a5d6b6491e3c8a65aaafee3066e35;hb=d12bc3e1e4b3ee762036d1c226c3b2ba1a720fb9;hpb=e3e15ed6d698e5cc35f3b7f4c5db96adc38255c3 diff --git a/sources/LockFile.c b/sources/LockFile.c deleted file mode 100644 index 5fe7c3b..0000000 --- a/sources/LockFile.c +++ /dev/null @@ -1,55 +0,0 @@ -/* LockFile.c - * - * Copyright (C) 2002 Simone Piccardi - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/***************************************************************************** - * - * File LockFile.h: - * Function to manipulate lock files. - * - * Author: S. Piccardi, Dec 2002 - * - * $Id: LockFile.c,v 1.2 2002/12/03 22:30:11 piccardi Exp $ - * - *****************************************************************************/ -#include -#include -#include /* unix standard functions */ -#include /* file control (lock) functions */ -/* - * Function LockFile: - * - * Create a lockfile of the given pathname. Fail and exit in case of - * error or existence of the same lock file, using unlink do not need - * to remove the file. - * - * Author: Simone Piccardi, Dec. 2002 - */ -int LockFile(const char* path_name) -{ - return open(path_name, O_EXCL|O_CREAT); -} -/* - * Function UnlockFile: - * Remove a lockfile of the given pathname. - * - * Author: Simone Piccardi, Dec. 2002 - */ -int UnlockFile(const char* path_name) -{ - return unlink(path_name); -}