Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

tty(7)

termios(4)

getpass(3)  —  Subroutines

OSF

NAME

getpass - Reads a password

LIBRARY

Standard C Library (libc.a)

SYNOPSIS

#include <stdlib.h>

char ∗getpass (
const char ∗prompt );

PARAMETERS

promptPoints to the prompt string that is written to stderr. 

DESCRIPTION

The getpass() function opens the /dev/tty file, flushes output, disables echoing, and reads up to a newline character or an End-of-File character from the /dev/tty file.  The terminal state is then restored and /dev/tty is closed. 

If the getpass() function is interrupted by the SIGINT signal, the terminal state of /dev/tty will be restored before the signal is delivered to the calling process. 

NOTES

AES Support Level:
Trial use

RETURN VALUES

Upon successful completion, the getpass() function returns a pointer to a null-terminated string of no more than PASS_MAX characters. This return value points to data that is overwritten by successive calls. If the /dev/tty file cannot be opened, a NULL pointer is returned. 

FILES

/dev/ttySpecifies the tty device special file. 

RELATED INFORMATION

Files: tty(7) termios(4)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026