projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: libc internal mutex races with run_as
[lttng-tools.git]
/
src
/
common
/
sessiond-comm
/
unix.c
diff --git
a/src/common/sessiond-comm/unix.c
b/src/common/sessiond-comm/unix.c
index 97537c538b9b28d37cbcbbbe857951b1545ef2a6..4b6416168afa9f465406dd4bcce73d5d129180fe 100644
(file)
--- 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;
}
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.
/*
* Creates a AF_UNIX local socket using pathname bind the socket upon creation
* and return the fd.
@@
-173,7
+183,7
@@
ssize_t lttcomm_recv_unix_sock(int sock, void *buf, size_t len)
do {
len_last = iov[0].iov_len;
do {
len_last = iov[0].iov_len;
- ret = recvmsg(sock, &msg,
0
);
+ ret = recvmsg(sock, &msg,
MSG_NOSIGNAL
);
if (ret > 0) {
iov[0].iov_base += ret;
iov[0].iov_len -= ret;
if (ret > 0) {
iov[0].iov_base += ret;
iov[0].iov_len -= ret;
This page took
0.023726 seconds
and
4
git commands to generate.