projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: Lazily initialize max poll set size in poll compat
[lttng-tools.git]
/
src
/
common
/
compat
/
compat-poll.c
diff --git
a/src/common/compat/compat-poll.c
b/src/common/compat/compat-poll.c
index 32bcce8e4643fdf2c3d858da9273147537a39a06..7d4d0e1334ef1dc2abba28f9e694d2ce8052d1ea 100644
(file)
--- a/
src/common/compat/compat-poll.c
+++ b/
src/common/compat/compat-poll.c
@@
-15,7
+15,6
@@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#define _GNU_SOURCE
#define _LGPL_SOURCE
#include <assert.h>
#include <stdlib.h>
#define _LGPL_SOURCE
#include <assert.h>
#include <stdlib.h>
@@
-112,8
+111,9
@@
int compat_poll_create(struct lttng_poll_event *events, int size)
}
if (!poll_max_size) {
}
if (!poll_max_size) {
- ERR("poll_max_size not initialized yet");
- goto error;
+ if (lttng_poll_set_max_size()) {
+ goto error;
+ }
}
/* Don't bust the limit here */
}
/* Don't bust the limit here */
@@
-269,7
+269,9
@@
int compat_poll_wait(struct lttng_poll_event *events, int timeout)
}
}
}
}
- ret = poll(events->wait.events, events->wait.nb_fd, timeout);
+ do {
+ ret = poll(events->wait.events, events->wait.nb_fd, timeout);
+ } while (ret == -1 && errno == EINTR);
if (ret < 0) {
/* At this point, every error is fatal */
PERROR("poll wait");
if (ret < 0) {
/* At this point, every error is fatal */
PERROR("poll wait");
This page took
0.024723 seconds
and
4
git commands to generate.