Lines Matching refs:fdp

87 fdlog_pipe_restart (fdlog_pipe * const fdp, const unix_time64_t ts)  in fdlog_pipe_restart()  argument
89 if (fdp->start + 5 < ts) { /* limit restart to once every 5 sec */ in fdlog_pipe_restart()
91 fdp->start = ts; in fdlog_pipe_restart()
92 fdp->pid = fdlog_pipe_spawn(fdp->fdlog->fn, fdp->fd); in fdlog_pipe_restart()
94 return (fdp->pid > 0) ? 1 : -1; in fdlog_pipe_restart()
102 fdlog_pipe * const fdp = fdlog_pipes.ptr+i; in fdlog_pipes_restart() local
103 if (fdp->pid > 0) continue; in fdlog_pipes_restart()
104 fdlog_pipe_restart(fdp, ts); in fdlog_pipes_restart()
113 fdlog_pipe * const fdp = fdlog_pipes.ptr+i; in fdlog_pipes_waitpid_cb() local
114 if (fdp->pid != pid) continue; in fdlog_pipes_waitpid_cb()
116 fdp->pid = -1; in fdlog_pipes_waitpid_cb()
117 return fdlog_pipe_restart(fdp, log_monotonic_secs); in fdlog_pipes_waitpid_cb()
127 fdlog_pipe * const fdp = fdlog_pipes.ptr+i; in fdlog_pipes_close() local
128 fdlog_st * const fdlog = fdp->fdlog; in fdlog_pipes_close()
129 close(fdp->fd); in fdlog_pipes_close()
130 fdp->fd = -1; in fdlog_pipes_close()
144 fdlog_pipe * const fdp = fdlog_pipes.ptr+i; in fdlog_pipes_abandon_pids() local
145 fdp->pid = -1; in fdlog_pipes_abandon_pids()
169 fdlog_pipe * const fdp = fdlog_pipes.ptr + fdlog_pipes.used++; in fdlog_pipe_init() local
170 fdp->fd = fds[0]; in fdlog_pipe_init()
171 fdp->pid = pid; in fdlog_pipe_init()
172 fdp->start = log_monotonic_secs; in fdlog_pipe_init()
173 return (fdp->fdlog = fdlog_init(fn, fds[1], FDLOG_PIPE)); in fdlog_pipe_init()