Home GnuPG
Diffusion GnuPG eda17649f8bd

agent, dirmngr, scd: npth_init must be after fork.
eda17649f8bdUnpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

agent, dirmngr, scd: npth_init must be after fork.

* agent/gpg-agent.c (thread_init_once, initialize_modules): New.
(main): Make sure no daemonizing-fork call after npth_init, and no npth
calls before npth_init, with care of npth calls by assuan hooks.
* dirmngr/dirmngr.c (thread_init): New.
(main): Make sure npth_init must not be called before daemonizing fork.
* scd/scdaemon.c (main): Likewise.

It is simply the best for nPth not to allow the daemonizing fork after
npth_init, because semantics and implementations of forked child process
in a threaded application is a difficult corner case.

  • GnuPG-bug-id: T1779
  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on Oct 4 2016, 2:01 AM
Parents
rGa43739a2456a: agent: Remove the warning for the GKR hijacking.
Branches
Unknown
Tags
Unknown