[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master ac9da24: Avoid read error messages from 'inotify'
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master ac9da24: Avoid read error messages from 'inotify' |
Date: |
Sat, 05 Sep 2015 08:38:18 +0000 |
branch: master
commit ac9da241986b747c1122ad5d097db42795eb9737
Author: Robert Pluim <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Avoid read error messages from 'inotify'
* src/process.c (wait_reading_process_output): Add a
'tls_available' set and manipulate it instead of 'Available' when
checking TLS inputs. Assign the value to 'Available' only if we
find any TLS data waiting to be read. This avoids error messages
from 'inotify' that tries to read data it shouldn't. (Bug#21337)
---
src/process.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/process.c b/src/process.c
index 1ab8378..f4613be 100644
--- a/src/process.c
+++ b/src/process.c
@@ -4859,6 +4859,10 @@ wait_reading_process_output (intmax_t time_limit, int
nsecs, int read_kbd,
data is available in the buffers manually. */
if (nfds == 0)
{
+ fd_set tls_available;
+ int set = 0;
+
+ FD_ZERO (&tls_available);
if (! wait_proc)
{
/* We're not waiting on a specific process, so loop
@@ -4879,7 +4883,8 @@ wait_reading_process_output (intmax_t time_limit, int
nsecs, int read_kbd,
{
nfds++;
eassert (p->infd == channel);
- FD_SET (p->infd, &Available);
+ FD_SET (p->infd, &tls_available);
+ set++;
}
}
}
@@ -4896,9 +4901,12 @@ wait_reading_process_output (intmax_t time_limit, int
nsecs, int read_kbd,
nfds = 1;
eassert (0 <= wait_proc->infd);
/* Set to Available. */
- FD_SET (wait_proc->infd, &Available);
+ FD_SET (wait_proc->infd, &tls_available);
+ set++;
}
}
+ if (set)
+ Available = tls_available;
}
#endif
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master ac9da24: Avoid read error messages from 'inotify',
Eli Zaretskii <=