diff options
author | NIIBE Yutaka <[email protected]> | 2019-07-01 04:07:22 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2019-07-01 04:13:36 +0000 |
commit | 526714806da4e50c8e683b25d76460916d58ff41 (patch) | |
tree | 846cdeaa3de673a646cf871cac493db5300e84f6 | |
parent | spelling: Fix "synchronize" (diff) | |
download | gnupg-526714806da4e50c8e683b25d76460916d58ff41.tar.gz gnupg-526714806da4e50c8e683b25d76460916d58ff41.zip |
tools: gpgconf: Killing order is children-first.
* tools/gpgconf-comp.c (gc_component_kill): Reverse the order.
--
Cherry-picked from master commit:
7c877f942a344e7778005840ed7f3e20ace12f4a
The order matters in a corner case; On a busy machine, there was a
race condition between gpg-agent's running KILLAGENT command and its
accepting incoming request on the socket. If a request by
gpg-connect-agent was accepted, it resulted an error by sudden
shutdown. This change of the order can remove such a race.
Here, we know backend=0 is none.
GnuPG-bug-id: 4577
Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r-- | tools/gpgconf-comp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/gpgconf-comp.c b/tools/gpgconf-comp.c index d4b3ebd29..1ba242387 100644 --- a/tools/gpgconf-comp.c +++ b/tools/gpgconf-comp.c @@ -1339,7 +1339,7 @@ gc_component_kill (int component) } /* Do the restart for the selected backends. */ - for (backend = 0; backend < GC_BACKEND_NR; backend++) + for (backend = GC_BACKEND_NR-1; backend; backend--) { if (runtime[backend] && gc_backend[backend].runtime_change) (*gc_backend[backend].runtime_change) (1); |