Lines Matching refs:pid
922 notice("Device %s is locked by pid %d", dev, result);
930 int fd, pid, n;
982 n = read(fd, &pid, sizeof(pid));
987 error("Can't read pid from lock file %s", lock_file);
994 pid = atoi(lock_buffer);
996 if (pid == getpid())
998 if (pid == 0
999 || (kill(pid, 0) == -1 && errno == ESRCH)) {
1001 notice("Removed stale lock on %s (pid %d)", dev, pid);
1006 notice("Device %s is locked by pid %d", dev, pid);
1015 pid = getpid();
1017 slprintf(lock_buffer, sizeof(lock_buffer), "%10d\n", pid);
1020 write(fd, &pid, sizeof (pid));
1030 * thus changing our pid (we fork, the child carries on, and the parent dies).
1031 * Note that this is called by the parent, with pid equal to the pid
1038 relock(pid)
1039 int pid;
1059 slprintf(lock_buffer, sizeof(lock_buffer), "%10d\n", pid);
1062 write(fd, &pid, sizeof(pid));