Using --enable-special-filenames on Windows
patrick at enigmail.net
Wed Nov 27 18:28:39 CET 2013
On 26.11.13 20:47, Werner Koch wrote:
> On Tue, 26 Nov 2013 17:50, patrick at enigmail.net said:
>> I'm trying to figure out how to use --enable-special-filenames on
>> Windows. While the use of e.g. "-&9" is straight forward on Unix, I
>> wonder how I have to implement a Windows application to use the same
> GPGME is your friend ;-).
> You need to create a pipe with an inheritable file handle and pass that
> to gpg. The problem is that you need to use CreateProcess without the
> inherit flag (otherwise all handles would be inherited). The solution
> used by GPGME (and later done in the same way by GTK+) is to spawn a
> temporary process, duplicate the handles into that process along with a
> dup-to translation table and have that helper process then spawn gpg -
> now with the inherit flag set. It was quite some work to get that beast
> working reliable.
If I get it right, then gpgme-w32spawn does this translation. Now, I'd
assume that the easiest for my case would be to just use this bit of
gpgme and keep the rest as it is.
I tried to figure out how gpgme-w32spawn works. My understanding is that
you create a temporary file containing the translation table(?) and
otherwise you pass the arguments for gpg to the command line. However,
it's not straight forward by reading the code. Could you enlighten me?
More information about the Gcrypt-devel