agent,dirmngr: Check for homedir removal also using stat(2).
authorWerner Koch <wk@gnupg.org>
Wed, 26 Jul 2017 08:02:52 +0000 (10:02 +0200)
committerWerner Koch <wk@gnupg.org>
Wed, 26 Jul 2017 08:27:36 +0000 (10:27 +0200)
commitd50c2eff8d6931586c527edb3dea98dbc6facdec
tree842f13b0a188a94e0c49c053a6cdd9222f8f0a7d
parentf4ec7697a9c2d7587794d3bd75efbb0b51d6562f
agent,dirmngr: Check for homedir removal also using stat(2).

* agent/gpg-agent.c (have_homedir_inotify): New var.
(reliable_homedir_inotify): New var.
(main):  Set reliable_homedir_inotify.
(handle_tick): Call stat on the homedir.
(handle_connections): Mark availibility of the inotify watch.
* dirmngr/dirmngr.c (handle_tick): Call stat on the homedir.
(TIMERTICK_INTERVAL_SHUTDOWN): New.
(handle_connections): Depend tick interval on the shutdown state.
--

The stat call is used on systems which do not support inotify and also
when we assume that the inotify does not work reliable.

Signed-off-by: Werner Koch <wk@gnupg.org>
agent/gpg-agent.c
dirmngr/dirmngr.c