Copyright (c) 2006 PalmSource, Inc. All right reserverd.
#include <unistd.h>
#include <fcntl.h>
#include <glib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <stdio.h>
#include <hiker/config.h>
Go to the source code of this file.
Defines | |
#define | _ALP_APPSERVERLOCK_H 1 |
Functions | |
gboolean | alp_prv_acquirelock (char *filename) |
gboolean alp_prv_aquirelock( char *filename ); |
|
|
|
gboolean alp_prv_aquirelock( char *filename ); alp_prv_aquirelock locks the file pointed to by filename. It is OK if the file does not exist. It will create it and then lock it. The same process can lock the file mulitple times. However it does not keep track of the number of times. It will return TRUE if it aquired the lock, otherwise it returns FALSE. On error it returns FALSE. This is the standard UNIX file lock so the OS will release the lock when the process dies. |