version 1.62, 2006/08/11 18:09:49
|
version 1.63, 2006/08/15 19:46:36
|
|
|
# ifndef PEGASUS_OS_OS400 | # ifndef PEGASUS_OS_OS400 |
# include <unistd.h> | # include <unistd.h> |
# endif | # endif |
|
# include <fcntl.h> // File locking |
# define PEGASUS_UID_T uid_t | # define PEGASUS_UID_T uid_t |
# define PEGASUS_GID_T gid_t | # define PEGASUS_GID_T gid_t |
#else | #else |
|
|
| |
}; | }; |
| |
|
/** |
|
The AutoFileLock class uses an advisory file lock to allow access to a |
|
resource to be controlled. |
|
*/ |
|
class AutoFileLock |
|
{ |
|
public: |
|
|
|
AutoFileLock(const char* fileName); |
|
~AutoFileLock(); |
|
|
|
private: |
|
|
|
AutoFileLock(); |
|
AutoFileLock(const AutoFileLock&); |
|
AutoFileLock& operator=(const AutoFileLock&); |
|
|
|
#ifdef PEGASUS_OS_TYPE_UNIX |
|
struct flock _fl; |
|
int _fd; |
|
#endif |
|
}; |
|
|
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |
| |
#endif /* Pegasus_System_h */ | #endif /* Pegasus_System_h */ |