Lines Matching refs:pid

86 	pid_t	pid;		/* pid of read locker or local writer */
93 pid_t pid; /* pid of locker */
293 send_lockmsg(int cmd, pid_t pid, daemonaddr_t *dp, uint8_t seq)
306 message_buf.pid = pid;
434 the_lock.holding_pid[0] = lock_wanted.pid;
483 the_lock.holding_pid[i] = lock_wanted.pid;
498 the_lock.holding_pid[0] = lock_wanted.pid;
578 if (lrp->type == type && lrp->pid == msg->pid &&
613 lrp->pid = msg->pid;
660 spcs_log("cfglockd", NULL, " client %s port %hu, pid %d",
662 lock_queue[i].remote.sin_port, lock_queue[i].pid);
678 is_duplicate(cfglockd_t type, pid_t pid, uint8_t seq)
683 if (!pid) {
687 for (i = 0, bufp = unlock_buf; bufp->pid && i < MAX_UNLOCK;
689 if (bufp->pid == pid && bufp->seq == seq) {
694 type, pid);
703 (*unlock_buf).pid = pid;
712 if (is_duplicate(type, msg->pid, msg->seq)) {
716 the_lock.holding_pid[0] == msg->pid) {
730 /* clear out pid as it is meaningless on this node */
731 msg->pid = (pid_t)0;
737 unqueue_lock(daemonaddr_t *d, pid_t pid)
747 if (pid != (pid_t)0 && lrp->pid != pid)
772 local_unlock(pid_t pid, uint8_t seq, int method)
777 if (method == NORMAL_UNLOCK && is_duplicate(LOCK_NOTLOCKED, pid, seq)) {
782 /* delete reference to pid of reading process */
784 if (the_lock.holding_pid[i] == pid) {
798 if (pid != the_lock.holding_pid[0])
868 if (locker->pid == 0) /* remote lock request */
901 (void) printf(" holding pid:");
946 lockd_msg(message), dp_addr(host), mp->pid);
951 mp->order, mp->pid);
993 local_unlock(mp->pid, mp->seq, NORMAL_UNLOCK);
1009 * unqueue any locks asked for by pid and unlock any locks held by pid.
1013 purge_pid(pid_t pid)
1015 DPF((stderr, "purge locks for %ld\n", pid));
1016 unqueue_lock(NULL, pid);
1018 local_unlock(pid, 0, FORCE_UNLOCK);
1023 * The lock protecting the processes pid in the lockfile will
1031 pid_t pid;
1036 cfg_readpid(i, &pid);
1039 if (pid != (pid_t)0)
1040 purge_pid(pid);
1135 spcs_log("cfglockd", NULL, "pid %d unexpected signal %d, ignoring",
1143 spcs_log("cfglockd", NULL, "pid %d terminate on signal %d", getpid(),
1161 pid_t pid;
1215 spcs_log("cfglockd", NULL, "new lock daemon, pid %d", getpid());
1252 DPF((stderr, "Can't open pid file\n"));
1267 DPF((stderr, "Can't open pid file\n"));
1289 cfg_readpid(i, &pid);
1292 "init .dscfg.lck slot %d pid %d locked",
1293 i, pid);
1294 DPF((stderr, "client process %ld still alive\n", pid));