Lines Matching refs:lockfile
2748 char *lockfile;
2757 lockfile = bicat(unmeta(fn), ".LOCK");
2765 while ((fd = symlink(lnk, lockfile)) < 0) {
2773 if (lstat(lockfile, &sb) < 0) {
2781 unlink(lockfile);
2794 while (link(tmpfile, lockfile) < 0) {
2801 } else if (lstat(lockfile, &sb) < 0) {
2809 unlink(lockfile);
2820 while ((fd = open(lockfile, O_WRONLY|O_CREAT|O_EXCL, 0644)) < 0) {
2828 if (lstat(lockfile, &sb) < 0) {
2837 unlink(lockfile);
2850 free(lockfile);
2881 char *lockfile;
2883 lockfile = zalloc(strlen(fn) + 5 + 1);
2884 sprintf(lockfile, "%s.LOCK", fn);
2885 unlink(lockfile);
2886 free(lockfile);