Diffusion GnuPG 2abad7585a00

agent: Fix detection of exit of scdaemon.

Authored by gniibe on Mar 6 2019, 2:33 AM.

Description

agent: Fix detection of exit of scdaemon.

* agent/call-scd.c (start_scd): Acquire START_SCD_LOCK for
SCD_LOCAL_LIST.  Move common case code to fast path.
Release START_SCD_LOCK before calling unlock_scd.
When new CTX is allocated, clear INVALID flag.
(agent_reset_scd): Serialize the access to SCD_LOCAL_LIST by
START_SCD_LOCK.
  • GnuPG-bug-id: T4377
  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>