aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/dirmngr.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2017-11-15 14:30:21 +0000
committerWerner Koch <[email protected]>2017-11-15 14:31:52 +0000
commit0cfdd3b57d592fb6baa7dafe8fde124e8a6c7798 (patch)
treec0313699f3ddb6ab4269d3864edae8a8070c5bda /dirmngr/dirmngr.c
parentcommon: Change log_clock to printf style. (diff)
downloadgnupg-0cfdd3b57d592fb6baa7dafe8fde124e8a6c7798.tar.gz
gnupg-0cfdd3b57d592fb6baa7dafe8fde124e8a6c7798.zip
assuan: Fix exponential decay for first second.
* common/asshelp.c (wait_for_sock): Round SECSLEFT. * dirmngr/dirmngr.c (main): Take care of --debug-wait also in dameon mode. * common/sysutils.c (gnupg_usleep) [HAVE_NANOSLEEP]: Fix nanosleep use. -- Without the rounding we saw in verbose mose [...]to come up ... (5s) [...]to come up ... (4s) immediately without the expected one second delay. Waiting for the next seconds did not work if nanosleep was used due to improper passed parameters in gnupg_usleep. Adding --debug-wait for dirmngr in daemon mode is required to test this change. GnuPG-bug-id: 3490 Fixes-commit: 149041b0b917f4298239fe18b5ebd5ead71584a6 Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'dirmngr/dirmngr.c')
-rw-r--r--dirmngr/dirmngr.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c
index 9cb02036e..631256ded 100644
--- a/dirmngr/dirmngr.c
+++ b/dirmngr/dirmngr.c
@@ -1193,6 +1193,14 @@ main (int argc, char **argv)
current_logfile = xstrdup (logfile);
}
+ if (debug_wait)
+ {
+ log_debug ("waiting for debugger - my pid is %u .....\n",
+ (unsigned int)getpid());
+ gnupg_sleep (debug_wait);
+ log_debug ("... okay\n");
+ }
+
#ifndef HAVE_W32_SYSTEM
if (strchr (socket_name, ':'))
{