Home GnuPG

cpp: Do not close stdout/stderr when destroying EditInteractor

Description

cpp: Do not close stdout/stderr when destroying EditInteractor

* lang/cpp/src/editinteractor.cpp (EditInteractor::Private): Initialize
members 'state' and 'debug' in-class. Add member 'debugNeedsClosing'.
(EditInteractor::Private::Private): Remove members initializers.
Remember if 'debug' needs to be closed.
(EditInteractor::Private::~Private): Only close 'debug' if it needs to
be closed.

This fixes the problem that after destroying an edit interactor all
debug output went to /dev/null instead of stderr (or stdout) if one
enabled debugging of the edit interactors with GPGMEPP_INTERACTOR_DEBUG
set to stderr (or stdout).

Details

Provenance
ikloeckerAuthored on May 5 2021, 6:52 PM
Parents
rGPGMEPP668184ff53bb: cpp: Add support for trust signatures to sign key edit interactor
Branches
Unknown
Tags
Unknown
References
tag: gpgme-1.16.0