summaryrefslogtreecommitdiffstats
path: root/src/fastd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fastd.c')
-rw-r--r--src/fastd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fastd.c b/src/fastd.c
index b6dabf1..e8b4677 100644
--- a/src/fastd.c
+++ b/src/fastd.c
@@ -124,7 +124,8 @@ static void init_signals(void) {
void fastd_open_pipe(int *readfd, int *writefd) {
int pipefd[2];
- if (pipe(pipefd))
+ /* use socketpair with SOCK_DGRAM instead of pipe2 with O_DIRECT to keep this portable */
+ if (socketpair(AF_UNIX, SOCK_DGRAM, 0, pipefd))
exit_errno("pipe");
fastd_setfd(pipefd[0], FD_CLOEXEC, 0);