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