Home GnuPG
Diffusion GnuPG 0336e5d1a7b9

gpg: Emit FAILURE stati now in almost all cases.

Description

gpg: Emit FAILURE stati now in almost all cases.

* g10/cpr.c (write_status_failure): Make it print only once.
* g10/gpg.c (wrong_args): Bump error counter.
(g10_exit): Print a FAILURE status if we ever did a log_error etc.
(main): Use log_error instead of log_fatal at one place.  Print a
FAILURE status for a bad option.  Ditto for certain exit points so
that we can see different error locations.

This makes it easier to detect errors by tools which have no way to
get the exit code (e.g. due to double forking).

  • GnuPG-bug-id: T3872
  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Apr 6 2018, 5:32 PM
Parents
rGcfd07798087f: doc: Add a code comment about back signatures.
Branches
Unknown
Tags
Unknown
Tasks
T3872: Invalid --sender option does not produce parseable output