tools: gpgconf: Killing order is children-first.
authorNIIBE Yutaka <gniibe@fsij.org>
Mon, 1 Jul 2019 04:07:22 +0000 (13:07 +0900)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 1 Jul 2022 16:06:43 +0000 (17:06 +0100)
commit1a1a07ca165a258ca9dab8696f0d945a89ae62d8
tree9a1c6775c186ff0a8f7f52c48084e41bba6aa7aa
parent645a014fde03b18d480109db0707215ba3a8ff81
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 <gniibe@fsij.org>
(cherry picked from commit 526714806da4e50c8e683b25d76460916d58ff41)

Gbp-Pq: Topic from-2.2.17
Gbp-Pq: Name tools-gpgconf-Killing-order-is-children-first.patch
tools/gpgconf-comp.c