aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2017-03-13 16:42:08 +0000
committerWerner Koch <[email protected]>2017-03-13 16:43:07 +0000
commit9a77b3b6e41f97b1209ad61c04b3dd33242ecae8 (patch)
tree20af9c2cb3d8f0006407de37c0a2def1dd8f2291
parenttests: Run the tests for the Python bindings of GPGME. (diff)
downloadgnupg-9a77b3b6e41f97b1209ad61c04b3dd33242ecae8.tar.gz
gnupg-9a77b3b6e41f97b1209ad61c04b3dd33242ecae8.zip
gpg: Flush stdout before printing stats with --check-sigs.
* g10/keylist.c (print_signature_stats): Flush stdout. (list_keyblock_colon): Use es_flush instead of fflush. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to '')
-rw-r--r--g10/keylist.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/g10/keylist.c b/g10/keylist.c
index 3f9e31389..32cf1e845 100644
--- a/g10/keylist.c
+++ b/g10/keylist.c
@@ -465,6 +465,10 @@ print_signature_stats (struct keylist_context *s)
if (!s->check_sigs)
return; /* Signature checking was not requested. */
+ /* Better flush stdout so that the stats are always printed after
+ * the output. */
+ es_fflush (es_stdout);
+
if (s->good_sigs)
log_info (ngettext("%d good signature\n",
"%d good signatures\n", s->good_sigs), s->good_sigs);
@@ -1446,7 +1450,7 @@ list_keyblock_colon (ctrl_t ctrl, kbnode_t keyblock,
{
PKT_public_key *signer_pk = NULL;
- fflush (stdout);
+ es_fflush (es_stdout);
if (opt.no_sig_cache)
signer_pk = xmalloc_clear (sizeof (PKT_public_key));