[PATCH gpgme v2 1/3] gpg: Add option --exit-on-status-write-error

Werner Koch wk at gnupg.org
Mon Feb 8 21:17:01 CET 2016


On Fri,  5 Feb 2016 09:17, ueno at gnu.org said:

> +  if (!rc)
> +    rc = add_arg (gpg, "--exit-on-status-write-error");

You can't do this w/o checking the gpg version.  Checking the here is
not yet supported.  This requires to do something like

  if (!gpg->version)
     gpg->version = gpg_get_version (file_name);

  if (!rc && gpg->version && _gpgme_compare_versions (gpg->version, "2.1.11"))
     rc = add_arg (gpg, "--exit-on-status-write-error");

plus code to release ->version.  However, this simple solution will
run an extra gpg before the acualt gpg call.  A better solution is to
store the version in the higher level engine info and pass it down to
gpg_new.



Shalom-Salam,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.




More information about the Gnupg-devel mailing list