summaryrefslogtreecommitdiffstats
path: root/common/exechelp-w32.c
diff options
context:
space:
mode:
authorJustus Winter <justus@g10code.com>2016-02-04 17:03:48 +0100
committerJustus Winter <justus@g10code.com>2016-02-23 11:58:20 +0100
commit54acc87c1e0b100accbfd02cfce59a897f2f0ce1 (patch)
treee96d5deeffef3d5befa5b4ccb7213e7ffd6394d9 /common/exechelp-w32.c
parentcommon/exechelp: Avoid magic numbers. (diff)
downloadgnupg2-54acc87c1e0b100accbfd02cfce59a897f2f0ce1.tar.xz
gnupg2-54acc87c1e0b100accbfd02cfce59a897f2f0ce1.zip
common/exechelp: Mute the Windows version.
* common/exechelp-w32.c (gnupg_wait_process): Do not print an error if the exit code can be returned. This makes the Windows version behave like the POSIX version. Signed-off-by: Justus Winter <justus@g10code.com>
Diffstat (limited to 'common/exechelp-w32.c')
-rw-r--r--common/exechelp-w32.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/common/exechelp-w32.c b/common/exechelp-w32.c
index 11bcea78a..a77e27c53 100644
--- a/common/exechelp-w32.c
+++ b/common/exechelp-w32.c
@@ -713,9 +713,10 @@ gnupg_wait_process (const char *pgmname, pid_t pid, int hang, int *r_exitcode)
}
else if (exc)
{
- log_error (_("error running '%s': exit status %d\n"),
- pgmname, (int)exc );
- if (r_exitcode)
+ if (!r_exitcode)
+ log_error (_("error running '%s': exit status %d\n"),
+ pgmname, (int)exc);
+ else
*r_exitcode = (int)exc;
ec = GPG_ERR_GENERAL;
}