projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix handling of sessiond respawn after a SIGKILL
[lttng-tools.git]
/
liblttngctl
/
liblttngctl.c
diff --git
a/liblttngctl/liblttngctl.c
b/liblttngctl/liblttngctl.c
index 4faf8414f7cf5d7deb31f2658ee0a7a850a1fe00..2464bce3b2d1eb30ab0252a2fc4f224a5a85b0c0 100644
(file)
--- a/
liblttngctl/liblttngctl.c
+++ b/
liblttngctl/liblttngctl.c
@@
-608,13
+608,22
@@
int lttng_session_daemon_alive(void)
return ret;
}
return ret;
}
- /* If socket exist, we c
onsider the daemon started
*/
+ /* If socket exist, we c
heck if the daemon listens to connect.
*/
ret = access(sessiond_sock_path, F_OK);
if (ret < 0) {
/* Not alive */
return 0;
}
ret = access(sessiond_sock_path, F_OK);
if (ret < 0) {
/* Not alive */
return 0;
}
+ ret = lttcomm_connect_unix_sock(sessiond_sock_path);
+ if (ret < 0) {
+ /* Not alive */
+ return 0;
+ }
+ ret = lttcomm_close_unix_sock(ret);
+ if (ret < 0)
+ perror("lttcomm_close_unix_sock");
+
/* Is alive */
return 1;
}
/* Is alive */
return 1;
}
This page took
0.02513 seconds
and
4
git commands to generate.