projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: leaked chunk reference in lttng_consumer_create_trace_chunk
[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 0220b27854ab776294404c6c80e9a5608bfdeb54..4ea23c17318e1439f36a94b134194d13b070e4de 100644
(file)
--- a/
src/common/compat/compat-poll.c
+++ b/
src/common/compat/compat-poll.c
@@
-291,7
+291,8
@@
error:
/*
* Wait on poll() with timeout. Blocking call.
*/
/*
* Wait on poll() with timeout. Blocking call.
*/
-int compat_poll_wait(struct lttng_poll_event *events, int timeout)
+int compat_poll_wait(struct lttng_poll_event *events, int timeout,
+ bool interruptible)
{
int ret, active_fd_count;
int idle_pfd_index = 0;
{
int ret, active_fd_count;
int idle_pfd_index = 0;
@@
-320,10
+321,11
@@
int compat_poll_wait(struct lttng_poll_event *events, int timeout)
do {
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);
+ } while (
!interruptible &&
ret == -1 && errno == EINTR);
if (ret < 0) {
if (ret < 0) {
- /* At this point, every error is fatal */
- PERROR("poll wait");
+ if (errno != EINTR) {
+ PERROR("poll wait");
+ }
goto error;
}
goto error;
}
@@
-350,7
+352,7
@@
int compat_poll_wait(struct lttng_poll_event *events, int timeout)
struct pollfd *idle_pfd = &events->wait.events[idle_pfd_index];
struct pollfd *current_pfd = &events->wait.events[i];
struct pollfd *idle_pfd = &events->wait.events[idle_pfd_index];
struct pollfd *current_pfd = &events->wait.events[i];
- if (ipfd->revents != 0) {
+ if (i
dle_
pfd->revents != 0) {
swap_pfd = *current_pfd;
*current_pfd = *idle_pfd;
*idle_pfd = swap_pfd;
swap_pfd = *current_pfd;
*current_pfd = *idle_pfd;
*idle_pfd = swap_pfd;
This page took
0.024709 seconds
and
4
git commands to generate.