NAME
fgetpass - read a password from stream
SYNOPSIS
#include <stdio.h>
char *fgetpass(prompt, stream)
char *prompt;
FILE *stream;
DESCRIPTION
Fgetpass reads a password from the named input stream. The
password is terminated by a newline character, which is not
retained.
If the input stream corresponds
to a terminal, then echoing is
temporarily disabled and the null-terminated string prompt
is
displayed before reading the password. In this case,
interrupt and
quit signals are also temporarily caught for the duration of
the
read, and the terminal echo mode is restored to its original
state
before such signals are processed.
A pointer is returned to a
null-terminated string of at most 8
characters.
Unlike getpass(3), fgetpass does
not flush the terminal input
buffer when changing echo states.
SEE ALSO
getpass(3), crypt(3)
BUGS
The return value points to static data whose content is
overwritten
by each call.