Lines Matching refs:lockfile
61 static int lockfile;
185 lockfile = open(LOCKFILE, O_RDWR|O_CREAT, 0600);
186 if (lockfile != -1) {
187 if (lockf(lockfile, F_LOCK, 0) == 0) {
188 if (fstat(lockfile, &fdata) == 0) {
192 if ((write_cnt = write(lockfile, buff,
205 lockf(lockfile, F_ULOCK, 0);
206 close(lockfile);
213 lockf(lockfile, F_ULOCK, 0);
214 close(lockfile);
220 close(lockfile);
234 PROT_READ | PROT_WRITE, MAP_SHARED, lockfile, 0);
237 lockf(lockfile, F_ULOCK, 0);
238 close(lockfile);
248 lockf(lockfile, F_ULOCK, 0);
249 close(lockfile);
259 if (lockf(lockfile, F_ULOCK, 0) != 0) {
263 close(lockfile);
267 if (close(lockfile) == 0) {