Searched defs:pid_fd (Results 1 - 2 of 2) sorted by relevance

/illumos-gate/usr/src/cmd/oplhpd/
H A Doplhpd.c50 static int pid_fd; variable
96 (void) close(pid_fd);
169 if ((pid_fd = open(OPLHPD_PID_FILE, O_RDWR | O_CREAT, 0644)) < 0) {
174 if (lockf(pid_fd, F_TLOCK, 0L) < 0) {
183 (void) ftruncate(pid_fd, 0);
185 while ((ret = write(pid_fd, pid_str, i)) != i) {
/illumos-gate/usr/src/cmd/power/
H A Dpowerd.c200 int pid_fd; local
208 if ((pid_fd = open_pidfile(prog)) == -1)
263 if (write_pidfile(pid_fd, pid) == -1) /* logs errors on failure */
265 (void) close(pid_fd);

Completed in 77 milliseconds