GNUPG CLI endless loop when using --batch and --decrypt on detached signature file

Werner Koch wk at gnupg.org
Tue Apr 21 22:29:30 CEST 2009


On Tue, 21 Apr 2009 20:29, Harakiri said:

> Im using --batch in unattended mode but when i use --decrypt on a detached signature file there is no way to quit the program except control + c - what am i supposed to do? status-fd does not indicate that this is a signature file (not encrypted) - so i cant do anything

According to your problem description you are not using --batch:

  2. using -decrypt without batch on detached signature file
  
  gpg --no-options --status-fd 2 --yes --output out.out --decrypt in.in.asc

If there is a tty available gpg will ask the user.  This is a
consequence of the option to use gpg in a pipeline - then you need to
ask the user for additional data (e.g. the passphrase) without getting
into conflicts with the pipeline.  Because it is not easy to decide
whether a tty is available or not, unattended usage requires the use of
the --batch option.

Controlling gpg using --status-fd / --command-fd is an advanced method
and I can't give an introduction to this right now.  Check GPA to see
how to write such code (gpa/src/gpgmeedit.c).  However, I am pretty
sure that you don't want to do this - this is intended for user
frontends.


Shalom-Salam,

   Werner


-- 
Die Gedanken sind frei.  Auschnahme regelt ein Bundeschgesetz.




More information about the Gnupg-users mailing list