Lines Matching refs:lockfile
59 static int lockfile; variable
183 lockfile = open(LOCKFILE, O_RDWR|O_CREAT, 0600); in init_lock_map()
184 if (lockfile != -1) { in init_lock_map()
185 if (lockf(lockfile, F_LOCK, 0) == 0) { in init_lock_map()
186 if (fstat(lockfile, &fdata) == 0) { in init_lock_map()
190 if ((write_cnt = write(lockfile, buff, in init_lock_map()
203 lockf(lockfile, F_ULOCK, 0); in init_lock_map()
204 close(lockfile); in init_lock_map()
211 lockf(lockfile, F_ULOCK, 0); in init_lock_map()
212 close(lockfile); in init_lock_map()
218 close(lockfile); in init_lock_map()
232 PROT_READ | PROT_WRITE, MAP_SHARED, lockfile, 0); in init_lock_map()
235 lockf(lockfile, F_ULOCK, 0); in init_lock_map()
236 close(lockfile); in init_lock_map()
246 lockf(lockfile, F_ULOCK, 0); in init_lock_map()
247 close(lockfile); in init_lock_map()
257 if (lockf(lockfile, F_ULOCK, 0) != 0) { in init_lock_map()
261 close(lockfile); in init_lock_map()
265 if (close(lockfile) == 0) { in init_lock_map()