Photo ID race condition

David Shaw dshaw at
Tue May 28 01:51:01 CEST 2002

On Mon, May 27, 2002 at 11:54:50AM -0500, Keith Ray wrote:
> There is a (non-security) race condition in the photo ID code under
> Windows.  If the user has a slow loading image viewer (ie. Mozilla), GnuPG could
> delete the temp file before the viewer finishes initializing.  I can think of a
> number of solutions:
> 1. Wait for the viewer to exit before returning to GnuPG.
> 2. Insert a delay between exec_read() and exec_finish().  Then again, on a slow
> system with little RAM, how much is enough?
> 3. Delay deleting the temp files until GnuPG exits.

This is a known problem with 1.0.7 (1.0.7 was never really intended
for widespread Win32 use).  Until 1.0.8 is released with a
non-system()-based implementation of the exec code, you have a few

1) Patch the code based on the CVS
2) Use %I instead of %i in your photo-viewer command line
3) Try a photo-viewer of "start /w %i.jpg"

(#3 should work but I haven't tested it - I'm traveling and have no
access to a windows box at the moment)


   David Shaw  |  dshaw at  |  WWW
   "There are two major products that come out of Berkeley: LSD and UNIX.
      We don't believe this to be a coincidence." - Jeremy S. Anderson

More information about the Gnupg-devel mailing list