Wrapping gnupg for Tcl

Werner Koch wk at gnupg.org
Tue Jul 17 21:34:01 CEST 2001

On Tue, 17 Jul 2001 13:11:27 -0500, Jonathan Hayward said:

> to be executed from within another program)? Is there experience with e.g.
> why it would exit on 2nd and subsequent invocations if used from within
> another program? I'm resetting global variables, if that helps.

Are you sure that you are zeroing out the BSS?  Anyway, GnuPG is not
designed to be turned into a library.

What you have to do is: Run the code from main once and break out the
big switch over the commands so that you can just run this switch on
further invocations.  Well, you have to make sure that all variable
stuff setup before that switch does not change or you must somehow
adjust this initialization.  Simply running main() multiple times
won't work.

Werner Koch        Omnis enim res, quae dando non deficit, dum habetur
g10 Code GmbH      et non datur, nondum habetur, quomodo habenda est.
Privacy Solutions                                        -- Augustinus

More information about the Gnupg-devel mailing list