Home GnuPG
Diffusion GnuPG 563bfbb0be4e

agent: Fix a race condition which results accessing finished scd.

Description

agent: Fix a race condition which results accessing finished scd.

* agent/call-daemon.c (daemon_start): Decision of connection/reuse of
CTX and assignment to ->ctx should be done with the lock.

When scdaemon is exiting and agent tries to spawn/connect/reconnect,
there is a race condition between detecting finish of scd and
spawn/connect/reconnect.

  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on Jun 11 2024, 8:21 AM
Parents
rGfee890a2ab7f: agent: Silence debug output from the PIN caching.
Branches
Unknown
Tags
Unknown