[PATCH] keyedit.c: Replace calls to printf by es_printf.

Werner Koch wk at gnupg.org
Thu Feb 19 17:25:02 CET 2015


On Wed, 18 Feb 2015 21:18, guilhem at fripost.org said:
> Needed for unattended key edits with --status-fd, because since 2.1
> status prompts are preceded by es_fflush (in cpr.c:do_get_from_fd) not
> fflush(3), so the standard output may not be flushed before each prompt.

commit d2a70fd8348d6c11d1960caf2afe0701833dad6a
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Feb 19 17:22:27 2015 +0100

    gpg: Replace remaining uses of stdio by estream.
    
    * g10/sign.c (sign_file):  Use log_printf instead of stderr.
    * g10/tdbdump.c (export_ownertrust): Use estream fucntions.
    (import_ownertrust): Ditto.
    * g10/tdbio.c (tdbio_dump_record): Ditto.  Change arg to estream_t.
    --
    
    Reported-by: Guilhem Moulin <guilhem at fripost.org>
    
      Needed for unattended key edits with --status-fd, because since 2.1
      status prompts are preceded by es_fflush (in cpr.c:do_get_from_fd)
      not fflush(3), so the standard output may not be flushed before each
      prompt. (Which breaks scripts using select(2) to multiplex between
      the standard and status outputs.)
    
    His patch only affected print_and_check_one_sig_colon() but there are
    many more places where stdio and estream are mixed.  This patch now
    replaces most of them in g10/.  At some places stdio is still used,
    but that is local to a function and should not have side effects.

Thanks,

 Werner
    

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




More information about the Gnupg-devel mailing list