Lines Matching defs:idle_pipe
1217 static void do_idle_pipe_dance(int idle_pipe[4]) {
1218 assert(idle_pipe);
1221 idle_pipe[1] = safe_close(idle_pipe[1]);
1222 idle_pipe[2] = safe_close(idle_pipe[2]);
1224 if (idle_pipe[0] >= 0) {
1227 r = fd_wait_for_event(idle_pipe[0], POLLHUP, IDLE_TIMEOUT_USEC);
1229 if (idle_pipe[3] >= 0 && r == 0 /* timeout */) {
1233 n = write(idle_pipe[3], "x", 1);
1236 fd_wait_for_event(idle_pipe[0], POLLHUP, IDLE_TIMEOUT2_USEC);
1239 idle_pipe[0] = safe_close(idle_pipe[0]);
1243 idle_pipe[3] = safe_close(idle_pipe[3]);
1484 if (params->idle_pipe)
1485 do_idle_pipe_dance(params->idle_pipe);