inited = true;
- xpipe(signal_fds);
- xset_nonblocking(signal_fds[0]);
- xset_nonblocking(signal_fds[1]);
+ xpipe_nonblocking(signal_fds);
sigemptyset(&fatal_signal_set);
for (i = 0; i < ARRAY_SIZE(fatal_signals); i++) {
inited = true;
/* Create notification pipe. */
- xpipe(fds);
- xset_nonblocking(fds[0]);
- xset_nonblocking(fds[1]);
+ xpipe_nonblocking(fds);
/* Set up child termination signal handler. */
memset(&sa, 0, sizeof sa);
static bool inited;
if (!inited) {
inited = true;
- xpipe(fds);
- xset_nonblocking(fds[0]);
- xset_nonblocking(fds[1]);
+ xpipe_nonblocking(fds);
}
}
}
}
+void
+xpipe_nonblocking(int fds[2])
+{
+ xpipe(fds);
+ xset_nonblocking(fds[0]);
+ xset_nonblocking(fds[1]);
+}
+
void
xsocketpair(int domain, int type, int protocol, int fds[2])
{
int get_mtime(const char *file_name, struct timespec *mtime);
void xpipe(int fds[2]);
+void xpipe_nonblocking(int fds[2]);
char *describe_fd(int fd);