Home | History | Annotate | Download | only in pppd

Lines Matching refs:lock_file

869 static char lock_file[MAXPATHLEN];
883 strlcpy(lock_file, dev, sizeof(lock_file));
890 error("Can't create lock file %s", lock_file);
909 slprintf(lock_file, sizeof(lock_file), "%s/LK.%03d.%03d.%03d",
928 slprintf(lock_file, sizeof(lock_file), "%s/LCK..%s", LOCK_DIR, dev);
931 while ((fd = open(lock_file, O_EXCL | O_CREAT | O_RDWR, 0644)) < 0) {
933 error("Can't create lock file %s: %m", lock_file);
938 fd = open(lock_file, O_RDONLY, 0);
942 error("Can't open existing lock file %s: %m", lock_file);
953 error("Can't read pid from lock file %s", lock_file);
966 if (unlink (lock_file) == 0) {
977 lock_file[0] = 0;
1015 if (lock_file[0] == 0)
1017 fd = open(lock_file, O_WRONLY, 0);
1019 error("Couldn't reopen lock file %s: %m", lock_file);
1020 lock_file[0] = 0;
1042 if (lock_file[0]) {
1044 (void) rmlock(lock_file, (void *) 0);
1046 unlink(lock_file);
1048 lock_file[0] = 0;