getpass()

get password 

Function


SYNOPSIS

#include <unistd.h>

#include <pwd.h>

char *getpass(const char* prompt);


DESCRIPTION

The getpass() function opens the process' controlling terminal, writes the specified prompt, disables echoing, reads a string of characters up to the next newline character or EOF, restores the terminal state and closes the terminal.


PARAMETERS

prompt 

Points to the prompt string to be displayed.


RETURN VALUES

On success, getpass() returns a pointer to a null-terminated string of at most _PASSWORD_LEN bytes that was read from the terminal device. On error, it restores the terminal state and returns a null pointer.


CONFORMANCE

UNIX 98.


MULTITHREAD SAFETY LEVEL

Unsafe.


PORTING ISSUES

Use of this function is deprecated. It may be withdrawn in a future release.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


PTC MKS Toolkit 10.5 Documentation Build 40.