getpass(3) Library Functions Manual getpass(3)
Name
getpass - read a password
Syntax
char *getpass(prompt)
char *prompt;
Description
The subroutine reads a password from the file or if that cannot be opened, from the standard input, after prompting with the null-termi-
nated string prompt and disabling echoing. The subroutine can return up to characters. is defined in A pointer is returned to a null-ter-
minated string of at most 16 characters.
Environment
When your program is compiled using the System V environment, if the file cannot be opened, a NULL pointer is returned. An interrupt will
terminate input and send an interrupt signal to the calling process before returning.
Restrictions
The return value points to static data whose content is overwritten by each call.
Files
See Also
getpass(3)