Lines Matching refs:lockfile
66 static int lockfile;
130 lockfile = open(LOCKFILE, O_RDWR|O_CREAT, 0600);
131 if (lockfile != -1) {
132 if (lockf(lockfile, F_LOCK, 0) == 0) {
133 if (fstat(lockfile, &fdata) == 0) {
137 if ((write_cnt = write(lockfile, buff,
152 lockf(lockfile, F_ULOCK, 0);
153 close(lockfile);
160 lockf(lockfile, F_ULOCK, 0);
161 close(lockfile);
167 close(lockfile);
181 PROT_READ | PROT_WRITE, MAP_SHARED, lockfile, 0);
185 lockf(lockfile, F_ULOCK, 0);
186 close(lockfile);
196 lockf(lockfile, F_ULOCK, 0);
197 close(lockfile);
207 if (lockf(lockfile, F_ULOCK, 0) != 0) {
210 close(lockfile);
214 if (close(lockfile) == 0) {