corrupt trustdb caused by commandline?

David Shaw dshaw at jabberwocky.com
Thu May 25 15:57:31 CEST 2006


On Thu, May 25, 2006 at 12:15:40AM -0400, Atom Smasher wrote:
> On Thu, 25 May 2006, David Shaw wrote:
> 
> >> * why was closing stdout causing gpg to have problems?
> >
> >It's not a GPG thing, specifically.  Closing stdout (or stderr) is
> >actually a pretty dangerous thing to do on *any* program that opens
> >files and also uses printf.
> ...
> >If the goal is to squish stdout, you should redirect stdout to
> >/dev/null rather than closing it outright.
> >
> >> * will this patch be incorporated into production?
> >
> >Yes.  Already has, actually.
> ==========================
> 
> this is being used in part of a script that just tests for return status, 
> and any output is undesired. would you recommend changing the script to 
> redirect stdout/stderr to /dev/null? or should it be ok, now, to just 
> close stdout/stderr? or is there a better way altogether that i'm 
> overlooking?

The "right" answer is always to redirect to /dev/null.  Again, this
isn't a GPG thing, but a general Unix thing.

David



More information about the Gnupg-devel mailing list