Lines Matching defs:flock
75 static int getflock(struct ps_prochandle *, int, struct flock *);
343 getflock(struct ps_prochandle *Pr, int fd, struct flock *flock_native)
364 struct flock flock;
389 flock.l_type = F_WRLCK;
390 flock.l_whence = 0;
391 flock.l_start = 0;
392 flock.l_len = 0;
393 flock.l_sysid = 0;
394 flock.l_pid = 0;
395 if ((Pstate(Pr) != PS_DEAD) && (getflock(Pr, fd, &flock) != -1)) {
396 if (flock.l_type != F_UNLCK && (flock.l_sysid || flock.l_pid)) {
397 unsigned long sysid = flock.l_sysid;
401 flock.l_type == F_RDLCK? "read" : "write");
404 if (flock.l_pid)
405 (void) printf(" process %d", (int)flock.l_pid);