projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Set SOCK_CLOEXEC on socket connected to
[lttng-ust.git]
/
liblttng-sessiond-comm
/
lttng-sessiond-comm.c
diff --git
a/liblttng-sessiond-comm/lttng-sessiond-comm.c
b/liblttng-sessiond-comm/lttng-sessiond-comm.c
index e370fcd3542b9efddbbf40d90bc904f32264846d..53e7462b6461c56c2ce690baa8a0d08e75ab0d17 100644
(file)
--- a/
liblttng-sessiond-comm/lttng-sessiond-comm.c
+++ b/
liblttng-sessiond-comm/lttng-sessiond-comm.c
@@
-117,7
+117,11
@@
int lttcomm_connect_unix_sock(const char *pathname)
int fd;
int ret;
int fd;
int ret;
- fd = socket(PF_UNIX, SOCK_STREAM, 0);
+ /*
+ * 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 | SOCK_CLOEXEC, 0);
if (fd < 0) {
perror("socket");
ret = fd;
if (fd < 0) {
perror("socket");
ret = fd;
This page took
0.023466 seconds
and
4
git commands to generate.