chiark
/
gitweb
/
~ian
/
gnupg2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
agent: Avoid scheduled checks on socket when inotify is working.
[gnupg2.git]
/
agent
/
gpg-agent.c
diff --git
a/agent/gpg-agent.c
b/agent/gpg-agent.c
index 1bfe0f3ae2a9e10001c93008ee1b7a43dd69436e..0e53549479f56044d4b26a9de2482193a41ceddd 100644
(file)
--- a/
agent/gpg-agent.c
+++ b/
agent/gpg-agent.c
@@
-2894,6
+2894,8
@@
handle_connections (gnupg_fd_t listen_fd,
/* avoid a fine-grained timer if we don't need one: */
timertbl[0].interval.tv_sec = need_tick () ? TIMERTICK_INTERVAL : 0;
/* avoid a fine-grained timer if we don't need one: */
timertbl[0].interval.tv_sec = need_tick () ? TIMERTICK_INTERVAL : 0;
+ /* avoid waking up to check sockets if we can count on inotify */
+ timertbl[1].interval.tv_sec = (my_inotify_fd == -1) ? CHECK_OWN_SOCKET_INTERVAL : 0;
/* loop through all timers, fire any registered functions, and
plan next timer to trigger */
/* loop through all timers, fire any registered functions, and
plan next timer to trigger */