diff options
author | Werner Koch <[email protected]> | 2017-11-13 09:52:36 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2017-11-13 10:59:50 +0000 |
commit | 5d83eb9226c0ce608ec284d8c9bc22ce84a00c25 (patch) | |
tree | 7b143812bc29d05f426f1736386e2c58426c8ab2 /dirmngr/domaininfo.c | |
parent | tests: Handle the case with DISABLE_REGEX. (diff) | |
download | gnupg-5d83eb9226c0ce608ec284d8c9bc22ce84a00c25.tar.gz gnupg-5d83eb9226c0ce608ec284d8c9bc22ce84a00c25.zip |
gpg-agent: Avoid getting stuck in shutdown pending state.
* agent/gpg-agent.c (handle_connections): Always check inotify fds.
--
I noticed a gpg-agent processed, probably in shutdown_pending state,
which was selecting on only these two inotify fds. The select
returned immediately but because we did not handle the fds in
shutdown_pending state they were not read and the next select call
returned one of them immediately again. Actually that should not
hanppen because the
if (active_connections == 0)
break; /* ready */
should have terminated the loop. For unknown reasons (maybe be just a
connection thread terminated in a gdb session) that did not happen.
By moving the check outside of the shutdown_pending condition and
closing the fd after they have been triggered the code should be more
robust.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'dirmngr/domaininfo.c')
0 files changed, 0 insertions, 0 deletions