Lines Matching refs:lock_file
2527 static char lock_file[40]; /* name of lock file created */
2545 slprintf(lock_file, sizeof(lock_file), "%s%03d.%03d.%03d",
2549 while ((fd = open(lock_file, O_EXCL | O_CREAT | O_RDWR, 0644)) < 0) {
2551 && (fd = open(lock_file, O_RDONLY, 0)) >= 0) {
2555 error("Can't read pid from lock file %s", lock_file);
2562 if (unlink(lock_file) == 0) {
2576 error("Can't create lock file %s: %m", lock_file);
2577 lock_file[0] = 0;
2594 if (lock_file[0]) {
2595 unlink(lock_file);
2596 lock_file[0] = 0;