projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: typo in --sig-parent help
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
session.c
diff --git
a/src/bin/lttng-sessiond/session.c
b/src/bin/lttng-sessiond/session.c
index a777b041428443fe856b4e7613920a377e7b494f..07031a30a5c5bc6cf603b84847aac2a866919ede 100644
(file)
--- a/
src/bin/lttng-sessiond/session.c
+++ b/
src/bin/lttng-sessiond/session.c
@@
-194,6
+194,16
@@
int session_create(char *name, uid_t uid, gid_t gid)
goto error;
}
goto error;
}
+ ret = gethostname(new_session->hostname, sizeof(new_session->hostname));
+ if (ret < 0) {
+ if (errno == ENAMETOOLONG) {
+ new_session->hostname[sizeof(new_session->hostname) - 1] = '\0';
+ } else {
+ ret = LTTNG_ERR_FATAL;
+ goto error;
+ }
+ }
+
/* Init kernel session */
new_session->kernel_session = NULL;
new_session->ust_session = NULL;
/* Init kernel session */
new_session->kernel_session = NULL;
new_session->ust_session = NULL;
This page took
0.027634 seconds
and
4
git commands to generate.