Fix: libc internal mutex races with run_as
[lttng-tools.git] / src / common / sessiond-comm / unix.c
index a66bb750a8633567d8020ba3ac1c1d6571f62662..4b6416168afa9f465406dd4bcce73d5d129180fe 100644 (file)
@@ -93,6 +93,16 @@ int lttcomm_accept_unix_sock(int sock)
        return new_fd;
 }
 
+LTTNG_HIDDEN
+int lttcomm_create_anon_unix_socketpair(int *fds)
+{
+       if (socketpair(PF_UNIX, SOCK_STREAM, 0, fds) < 0) {
+               PERROR("socketpair");
+               return -1;
+       }
+       return 0;
+}
+
 /*
  * Creates a AF_UNIX local socket using pathname bind the socket upon creation
  * and return the fd.
This page took 0.022702 seconds and 4 git commands to generate.