projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version 2.5.7
[lttng-ust.git]
/
liblttng-ust
/
lttng-ust-comm.c
diff --git
a/liblttng-ust/lttng-ust-comm.c
b/liblttng-ust/lttng-ust-comm.c
index fbdee7d3af8ea0d8d122ab3e4b3bb8a251ccc9a0..a7398286104d75a776124181549c33d9bc40e02c 100644
(file)
--- a/
liblttng-ust/lttng-ust-comm.c
+++ b/
liblttng-ust/lttng-ust-comm.c
@@
-927,7
+927,12
@@
void cleanup_sock_info(struct sock_info *sock_info, int exiting)
long page_size;
page_size = sysconf(_SC_PAGE_SIZE);
long page_size;
page_size = sysconf(_SC_PAGE_SIZE);
- if (page_size > 0) {
+ if (page_size <= 0) {
+ if (!page_size) {
+ errno = EINVAL;
+ }
+ PERROR("Error in sysconf(_SC_PAGE_SIZE)");
+ } else {
ret = munmap(sock_info->wait_shm_mmap, page_size);
if (ret) {
ERR("Error unmapping wait shm");
ret = munmap(sock_info->wait_shm_mmap, page_size);
if (ret) {
ERR("Error unmapping wait shm");
@@
-1109,7
+1114,11
@@
char *get_map_shm(struct sock_info *sock_info)
char *wait_shm_mmap;
page_size = sysconf(_SC_PAGE_SIZE);
char *wait_shm_mmap;
page_size = sysconf(_SC_PAGE_SIZE);
- if (page_size < 0) {
+ if (page_size <= 0) {
+ if (!page_size) {
+ errno = EINVAL;
+ }
+ PERROR("Error in sysconf(_SC_PAGE_SIZE)");
goto error;
}
goto error;
}
@@
-1216,8
+1225,9
@@
restart:
* deals with a killed or broken session daemon.
*/
sleep(5);
* deals with a killed or broken session daemon.
*/
sleep(5);
+ } else {
+ has_waited = 1;
}
}
- has_waited = 1;
prev_connect_failed = 0;
}
prev_connect_failed = 0;
}
This page took
0.024885 seconds
and
4
git commands to generate.