* gpg.c (reopen_std): New function to reopen fd 0, 1, or 2 if we are
commit8d1b971fc59afdc31d2e27ab3375b9b2ef1afb72
authordshaw <dshaw@8a63c251-dffc-0310-8ec6-d64dca2275b1>
Tue, 23 May 2006 22:04:09 +0000 (23 22:04 +0000)
committerdshaw <dshaw@8a63c251-dffc-0310-8ec6-d64dca2275b1>
Tue, 23 May 2006 22:04:09 +0000 (23 22:04 +0000)
treeb985f1babf0f27e6d1e1985910cfa676270d5a87
parentd1edf74126f270a3a76af061e9e74216619f5ee2
* 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.

git-svn-id: svn://cvs.gnupg.org/gnupg/trunk@4144 8a63c251-dffc-0310-8ec6-d64dca2275b1
g10/ChangeLog
g10/gpg.c