Lines Matching full:notify_pipe
128 static int notify_pipe[2];
132 if (pipe(notify_pipe) < 0) {
133 error("pipe(notify_pipe) failed %s", strerror(errno));
134 } else if ((fcntl(notify_pipe[0], F_SETFD, FD_CLOEXEC) == -1) ||
135 (fcntl(notify_pipe[1], F_SETFD, FD_CLOEXEC) == -1)) {
136 error("fcntl(notify_pipe, F_SETFD) failed %s", strerror(errno));
137 close(notify_pipe[0]);
138 close(notify_pipe[1]);
140 set_nonblock(notify_pipe[0]);
141 set_nonblock(notify_pipe[1]);
144 notify_pipe[0] = -1; /* read end */
145 notify_pipe[1] = -1; /* write end */
150 if (notify_pipe[1] != -1)
151 write(notify_pipe[1], "", 1);
156 if (notify_pipe[0] != -1)
157 FD_SET(notify_pipe[0], readset);
164 if (notify_pipe[0] != -1 && FD_ISSET(notify_pipe[0], readset))
165 while (read(notify_pipe[0], &c, 1) != -1)
698 max_fd = MAX(max_fd, notify_pipe[0]);
840 max_fd = MAX(max_fd, notify_pipe[0]);