OSDN Git Service

(split) LDP: Update original to LDP v3.64
[linuxjm/LDP_man-pages.git] / original / man3 / getpass.3
index d363ec4..5821e85 100644 (file)
@@ -1,5 +1,6 @@
 .\" Copyright (c) 2000 Andries Brouwer (aeb@cwi.nl)
 .\"
+.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
 .\" This is free documentation; you can redistribute it and/or
 .\" modify it under the terms of the GNU General Public License as
 .\" published by the Free Software Foundation; either version 2 of
 .\" GNU General Public License for more details.
 .\"
 .\" You should have received a copy of the GNU General Public
-.\" License along with this manual; if not, write to the Free
-.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
-.\" USA.
+.\" License along with this manual; if not, see
+.\" <http://www.gnu.org/licenses/>.
+.\" %%%LICENSE_END
 .\"
-.TH GETPASS 3  2010-09-20 "Linux" "Linux Programmer's Manual"
+.TH GETPASS 3  2013-06-21 "Linux" "Linux Programmer's Manual"
 .SH NAME
 getpass \- get a password
 .SH SYNOPSIS
@@ -44,15 +45,21 @@ _BSD_SOURCE ||
     (_XOPEN_SOURCE\ >=\ 500 ||
         _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED) &&
     !(_POSIX_C_SOURCE\ >=\ 200112L || _XOPEN_SOURCE\ >=\ 600)
-.TP 4
 .fi
-Before glibc 2.2.2: none
+.TP 4
+Before glibc 2.2.2:
+none
 .PD
 .RE
 .ad b
 .SH DESCRIPTION
 This function is obsolete.
 Do not use it.
+If you want to read input without terminal echoing enabled,
+see the description of the
+.I ECHO
+flag in
+.BR termios (3).
 .PP
 The
 .BR getpass ()
@@ -64,7 +71,7 @@ turns off echoing, reads one line (the "password"),
 restores the terminal state and closes
 .I /dev/tty
 again.
-.SH "RETURN VALUE"
+.SH RETURN VALUE
 The function
 .BR getpass ()
 returns a pointer to a static buffer containing (the first
@@ -86,7 +93,12 @@ The process does not have a controlling terminal.
 .\" A
 .\" .BR getpass ()
 .\" function appeared in Version 7 AT&T UNIX.
-.SH "CONFORMING TO"
+.SH ATTRIBUTES
+.SS Multithreading (see pthreads(7))
+The
+.BR getpass ()
+function is not thread-safe.
+.SH CONFORMING TO
 Present in SUSv2, but marked LEGACY.
 Removed in POSIX.1-2001.
 .SH NOTES
@@ -144,5 +156,13 @@ and returns
 .SH BUGS
 The calling process should zero the password as soon as possible to avoid
 leaving the cleartext password visible in the process's address space.
-.SH "SEE ALSO"
+.SH SEE ALSO
 .BR crypt (3)
+.SH COLOPHON
+This page is part of release 3.64 of the Linux
+.I man-pages
+project.
+A description of the project,
+and information about reporting bugs,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.