[Gpg4win-commits] r411 - in trunk: . src
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Jun 12 00:08:52 CEST 2007
Author: marcus
Date: 2007-06-12 00:08:51 +0200 (Tue, 12 Jun 2007)
New Revision: 411
Modified:
trunk/ChangeLog
trunk/src/gpgwrap.c
Log:
2007-06-12 Marcus Brinkmann <marcus at g10code.de>
* src/gpgwrap.c (main): Call _spawnv, not execv.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-05-24 23:38:39 UTC (rev 410)
+++ trunk/ChangeLog 2007-06-11 22:08:51 UTC (rev 411)
@@ -1,3 +1,7 @@
+2007-06-12 Marcus Brinkmann <marcus at g10code.de>
+
+ * src/gpgwrap.c (main): Call _spawnv, not execv.
+
2007-05-25 Marcus Brinkmann <marcus at g10code.de>
* src/uninst-gnupg.nsi: Fix path of gpgkeys helper programs.
Modified: trunk/src/gpgwrap.c
===================================================================
--- trunk/src/gpgwrap.c 2007-05-24 23:38:39 UTC (rev 410)
+++ trunk/src/gpgwrap.c 2007-06-11 22:08:51 UTC (rev 411)
@@ -145,10 +145,19 @@
if (!argv_quoted)
goto leave;
- execv (pgm, (const char **) argv_quoted);
- fprintf (stderr, "gpgwrap: executing `%s' failed: %s\n",
- pgm, strerror (errno));
- return 2;
+ /* Using execv does not replace the existing program image, but
+ spawns a new one and daemonizes it, confusing the command line
+ interpreter. So we have to use spawnv. */
+ rc = _spawnv (_P_WAIT, pgm, (const char **) argv_quoted);
+ if (rc < 0)
+ {
+ fprintf (stderr, "gpgwrap: executing `%s' failed: %s\n",
+ pgm, strerror (errno));
+ return 2;
+ }
+
+ return rc;
+
leave:
fprintf (stderr, "gpgwrap: internal error parsing my own name `%s'\n",
pgm);
More information about the Gpg4win-commits
mailing list