STDOUT? STDERR?

Christian Biere cbiere at TechFak.Uni-Bielefeld.DE
Mon Aug 9 17:54:13 CEST 2004


Atom 'Smasher' wrote:
> i noticed that gpg can send output to the terminal, apparently bypassing 
> STDOUT and STDERR...

I don't know where the upper-case comes from, in C it's stdin and stdout
which are both of type 'FILE *' and kind of special.

> i would expect this command to not send any output to the terminal:
> 	$ date | gpg -ear {untrusted_key} > /dev/null 2> /dev/null
 
> but it sends quite a bit of information to the terminal...?

Yes, to the TTY - if the shell is attached to one. See --batch and
--no-tty to suppress this.

> how is that done?

By using /dev/tty.

> why is it done that way?

Because /dev/stdin is already used as the input. The decision shouldn't
be up to the input data.

-- 
Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 303 bytes
Desc: not available
Url : /pipermail/attachments/20040809/92aa3719/attachment.bin


More information about the Gnupg-devel mailing list