projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Compat layer for gettid
[lttng-ust.git]
/
liblttng-ust-comm
/
lttng-ust-comm.c
diff --git
a/liblttng-ust-comm/lttng-ust-comm.c
b/liblttng-ust-comm/lttng-ust-comm.c
index 7e55cff556c6ced0314329401fdbe866480cf160..3277191c397f101e0cffa6dc30fdf0d3f9ed8049 100644
(file)
--- a/
liblttng-ust-comm/lttng-ust-comm.c
+++ b/
liblttng-ust-comm/lttng-ust-comm.c
@@
-29,7
+29,6
@@
#include <unistd.h>
#include <assert.h>
#include <errno.h>
#include <unistd.h>
#include <assert.h>
#include <errno.h>
-#include <fcntl.h>
#include <ust-comm.h>
#include <ust-comm.h>
@@
-120,17
+119,12
@@
int ustcomm_connect_unix_sock(const char *pathname)
* libust threads require the close-on-exec flag for all
* resources so it does not leak file descriptors upon exec.
*/
* libust threads require the close-on-exec flag for all
* resources so it does not leak file descriptors upon exec.
*/
- fd = socket(PF_UNIX, SOCK_STREAM, 0);
+ fd = socket(PF_UNIX, SOCK_STREAM
| SOCK_CLOEXEC
, 0);
if (fd < 0) {
perror("socket");
ret = fd;
goto error;
}
if (fd < 0) {
perror("socket");
ret = fd;
goto error;
}
- ret = fcntl(fd, F_SETFD, FD_CLOEXEC);
- if (ret < 0) {
- perror("fcntl");
- goto error_fcntl;
- }
memset(&sun, 0, sizeof(sun));
sun.sun_family = AF_UNIX;
memset(&sun, 0, sizeof(sun));
sun.sun_family = AF_UNIX;
@@
-150,7
+144,6
@@
int ustcomm_connect_unix_sock(const char *pathname)
return fd;
error_connect:
return fd;
error_connect:
-error_fcntl:
close(fd);
error:
return ret;
close(fd);
error:
return ret;
This page took
0.06279 seconds
and
4
git commands to generate.