X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fsessiond-comm%2Funix.c;h=4b6416168afa9f465406dd4bcce73d5d129180fe;hb=49e614cb2878f0664c9f44f9f24cb1d81116de21;hp=a66bb750a8633567d8020ba3ac1c1d6571f62662;hpb=fbe49b3b8c9dc03d99441f68dfb8bcf7450d71e3;p=lttng-tools.git diff --git a/src/common/sessiond-comm/unix.c b/src/common/sessiond-comm/unix.c index a66bb750a..4b6416168 100644 --- a/src/common/sessiond-comm/unix.c +++ b/src/common/sessiond-comm/unix.c @@ -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.