getpass(3C) getpass(3C)
NAME
getpass - read a password
SYNOPSIS
#include <unistd.h>
char *getpass(const char *prompt);
DESCRIPTION
getpass() opens the process controlling terminal, writes the null-
terminated string prompt to standard error output, disables echoing,
reads the string of characters up to the next newline character or
EOF, restores the terminal state and closes the terminal. A pointer is
returned to a null-terminated string of at most 8 characters. If an
error occurs, a null pointer is returned. An interrupt will terminate
input and send an interrupt signal to the calling program before
returning.
NOTES
The return value points to static data whose content is overwritten by
each call.
FILES
/dev/tty
Page 1 Reliant UNIX 5.44 Printed 11/98