Reading Passwords From /dev/tty

Werner Koch wk at gnupg.org
Thu Aug 3 17:53:46 CEST 2017


On Tue,  1 Aug 2017 07:26, evan at eklitzke.org said:

> password!), but I am curious why projects like GPG and sudo prefer using
> /dev/tty. Does anyone know what the argument is for using a pseudo-TTY?

dkg already explained the primary reason.  Another reason why we don't
use stdin is to avoid extra buffer in the stdio layer.  Well, that can
also be disabled but then using read(2) directly is easier.


Shalom-Salam,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: </pipermail/attachments/20170803/a69db384/attachment.sig>


More information about the Gnupg-devel mailing list