Using --enable-special-filenames on Windows

Patrick Brunschwig patrick at enigmail.net
Wed Nov 27 08:25:06 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 ;-).

Not really when integrating with Thunderbird...

> 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.

I see, this is really tricky.

> Mozilla might have a similar mechanism somewhere.

Well yes, I'll have to dig into the Mozilla code once more...

Thanks!

-Patrick



More information about the Gcrypt-devel mailing list