* gpg.c (reopen_std): New function to reopen fd 0, 1, or 2 if we are
authorDavid Shaw <dshaw@jabberwocky.com>
Tue, 23 May 2006 22:04:09 +0000 (22:04 +0000)
committerDavid Shaw <dshaw@jabberwocky.com>
Tue, 23 May 2006 22:04:09 +0000 (22:04 +0000)
commit782a70e52210f12879926b947862d8e8bc0bb4cc
treeb985f1babf0f27e6d1e1985910cfa676270d5a87
parent8fa55e28fee4429bf333572a431e800618f077d4
* gpg.c (reopen_std): New function to reopen fd 0, 1, or 2 if we are
called with them closed.  This is to protect our keyring/trustdb files
from corruption if they get attached to one of the standard fds.  Print a
warning if possible that this has happened, and fail completely if we
cannot reopen (should never happen). (main): Call it here.
g10/ChangeLog
g10/gpg.c