common/exechelp: Mute the Windows version.
authorJustus Winter <justus@g10code.com>
Thu, 4 Feb 2016 16:03:48 +0000 (17:03 +0100)
committerJustus Winter <justus@g10code.com>
Tue, 23 Feb 2016 10:58:20 +0000 (11:58 +0100)
* 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>
common/exechelp-w32.c

index 11bcea7..a77e27c 100644 (file)
@@ -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;
         }