Home GnuPG
Diffusion GnuPG c868d23f6180

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.

(cherry picked from commit 563bfbb0be4ebbc85bc56426541f666839e6aa13)

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

Details

Provenance
gniibeAuthored on Jun 11 2024, 8:21 AM
wernerCommitted on Jul 1 2024, 2:13 PM
Parents
rGa564a9f66ca3: gpg-mail-tube: New utility.
Branches
Unknown
Tags
Unknown