File: lockfile.h

package info (click to toggle)
liblockfile 0.1-4
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 80 kB
  • ctags: 29
  • sloc: ansic: 306; makefile: 90; sh: 50
file content (29 lines) | stat: -rw-r--r-- 662 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef _LOCKFILE_H
#define _LOCKFILE_H

#ifdef  __cplusplus
extern "C" {
#endif

/*
 *	Prototypes.
 */
int	lockfile_create(const char *lockfile, int retries);
int	lockfile_remove(const char *lockfile);
int	lockfile_touch(const char *lockfile);

/*
 *	Constants.
 */
#define	L_SUCCESS	0	/* Lockfile created			*/
#define L_NAMELEN	1	/* Recipient name too long (> 13 chars)	*/
#define L_TMPLOCK	2	/* Error creating tmp lockfile		*/
#define L_TMPWRITE	3	/* Can't write pid int tmp lockfile	*/
#define L_MAXTRYS	4	/* Failed after max. number of attempts	*/
#define L_ERROR		5	/* Unknown error; check errno		*/

#ifdef  __cplusplus
}
#endif

#endif /* _LOCKFILE_H */