Page MenuHome GnuPG

w32: gpg fails to open the console if run as a detached program
Closed, ResolvedPublic


This lets the 'armor.scm' test fail on windows. The test does the equivalent of

echo huge-key | gpg --import -

However, the gpg process is spawned with gnupg_spawn_process_fd, and therefore with CreateProcess (..., DETACHED_PROCESS, ...). This makes init_ttyfp fail:

00:06:51.228 Checking armored_key_8192 
00:06:51.228 Executing: 'd:\gnupg\gpg.exe' '--no-permission-warning' '--always-trust' '--output' '-' '--import' '-'
00:06:51.228 gpg: Fatal: open(CONOUT$) failed: rc=6

(reordered for clarity, windows jumbles the output around).

rc=6 is ERROR_INVALID_HANDLE, and from the various documentation I found I guess that this fails because we don't have a console. I don't know why this suddenly fails, I guess gpg now for some reason calls init_ttyfp.

We could allocate a console on demand. I don't know what kind of funny side-effects that would bring though.

Revisions and Commits

Event Timeline

werner added a subscriber: werner.

That is due to your fix for T2236 where you reused the code from keyedit which was intended to work only on the console.