.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved .TH "TALK" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual" .\" talk .SH PROLOG This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. .SH NAME talk \- talk to another user .SH SYNOPSIS .LP \fBtalk\fP \fIaddress\fP \fB[\fP\fIterminal\fP\fB]\fP\fB\fP .SH DESCRIPTION .LP The \fItalk\fP utility is a two-way, screen-oriented communication program. .LP When first invoked, \fItalk\fP shall send a message similar to: .sp .RS .nf \fBMessage from <\fP\fIunspecified string\fP\fB> talk: connection requested by\fP \fIyour_address\fP\fBtalk: respond with: talk\fP \fIyour_address\fP .fi .RE .LP to the specified \fIaddress\fP. At this point, the recipient of the message can reply by typing: .sp .RS .nf \fBtalk\fP \fIyour_address\fP .fi .RE .LP Once communication is established, the two parties can type simultaneously, with their output displayed in separate regions of the screen. Characters shall be processed as follows: .IP " *" 3 Typing the alert character shall alert the recipient's terminal. .LP .IP " *" 3 Typing -L shall cause the sender's screen regions to be refreshed. .LP .IP " *" 3 Typing the erase and kill characters shall affect the sender's terminal in the manner described by the \fBtermios\fP interface in the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface. .LP .IP " *" 3 Typing the interrupt or end-of-file characters shall terminate the local \fItalk\fP utility. Once the \fItalk\fP session has been terminated on one side, the other side of the \fItalk\fP session shall be notified that the \fItalk\fP session has been terminated and shall be able to do nothing except exit. .LP .IP " *" 3 Typing characters from \fILC_CTYPE\fP classifications \fBprint\fP or \fBspace\fP shall cause those characters to be sent to the recipient's terminal. .LP .IP " *" 3 When and only when the \fIstty\fP \fBiexten\fP local mode is enabled, the existence and processing of additional special control characters and multi-byte or single-byte functions shall be implementation-defined. .LP .IP " *" 3 Typing other non-printable characters shall cause implementation-defined sequences of printable characters to be sent to the recipient's terminal. .LP .LP Permission to be a recipient of a \fItalk\fP message can be denied or granted by use of the \fImesg\fP utility. However, a user's privilege may further constrain the domain of accessibility of other users' terminals. The \fItalk\fP utility shall fail when the user lacks the appropriate privileges to perform the requested action. .LP Certain block-mode terminals do not have all the capabilities necessary to support the simultaneous exchange of messages required for \fItalk\fP. When this type of exchange cannot be supported on such terminals, the implementation may support an exchange with reduced levels of simultaneous interaction or it may report an error describing the terminal-related deficiency. .SH OPTIONS .LP None. .SH OPERANDS .LP The following operands shall be supported: .TP 7 \fIaddress\fP The recipient of the \fItalk\fP session. One form of \fIaddress\fP is the <\fIuser\ name\fP>, as returned by the \fIwho\fP utility. Other address formats and how they are handled are unspecified. .TP 7 \fIterminal\fP If the recipient is logged in more than once, the \fIterminal\fP argument can be used to indicate the appropriate terminal name. If \fIterminal\fP is not specified, the \fItalk\fP message shall be displayed on one or more accessible terminals in use by the recipient. The format of \fIterminal\fP shall be the same as that returned by the \fIwho\fP utility. .sp .SH STDIN .LP Characters read from standard input shall be copied to the recipient's terminal in an unspecified manner. If standard input is not a terminal, talk shall write a diagnostic message and exit with a non-zero status. .SH INPUT FILES .LP None. .SH ENVIRONMENT VARIABLES .LP The following environment variables shall affect the execution of \fItalk\fP: .TP 7 \fILANG\fP Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables for the precedence of internationalization variables used to determine the values of locale categories.) .TP 7 \fILC_ALL\fP If set to a non-empty string value, override the values of all the other internationalization variables. .TP 7 \fILC_CTYPE\fP Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multi-byte characters in arguments and input files). If the recipient's locale does not use an \fILC_CTYPE\fP equivalent to the sender's, the results are undefined. .TP 7 \fILC_MESSAGES\fP Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error and informative messages written to standard output. .TP 7 \fINLSPATH\fP Determine the location of message catalogs for the processing of \fILC_MESSAGES \&.\fP .TP 7 \fITERM\fP Determine the name of the invoker's terminal type. If this variable is unset or null, an unspecified default terminal type shall be used. .sp .SH ASYNCHRONOUS EVENTS .LP When the \fItalk\fP utility receives a SIGINT signal, the utility shall terminate and exit with a zero status. It shall take the standard action for all other signals. .SH STDOUT .LP If standard output is a terminal, characters copied from the recipient's standard input may be written to standard output. Standard output also may be used for diagnostic messages. If standard output is not a terminal, \fItalk\fP shall exit with a non-zero status. .SH STDERR .LP None. .SH OUTPUT FILES .LP None. .SH EXTENDED DESCRIPTION .LP None. .SH EXIT STATUS .LP The following exit values shall be returned: .TP 7 \ 0 Successful completion. .TP 7 >0 An error occurred or \fItalk\fP was invoked on a terminal incapable of supporting it. .sp .SH CONSEQUENCES OF ERRORS .LP Default. .LP \fIThe following sections are informative.\fP .SH APPLICATION USAGE .LP Because the handling of non-printable, non- s is tied to the \fIstty\fP description of \fBiexten\fP, implementation extensions within the terminal driver can be accessed. For example, some implementations provide line editing functions with certain control character sequences. .SH EXAMPLES .LP None. .SH RATIONALE .LP The \fIwrite\fP utility was included in this volume of IEEE\ Std\ 1003.1-2001 since it can be implemented on all terminal types. The \fItalk\fP utility, which cannot be implemented on certain terminals, was considered to be a "better" communications interface. Both of these programs are in widespread use on historical implementations. Therefore, both utilities have been specified. .LP All references to networking abilities (\fItalk\fPing to a user on another system) were removed as being outside the scope of this volume of IEEE\ Std\ 1003.1-2001. .LP Historical BSD and System V versions of \fItalk\fP terminate both of the conversations when either user breaks out of the session. This can lead to adverse consequences if a user unwittingly continues to enter text that is interpreted by the shell when the other terminates the session. Therefore, the version of \fItalk\fP specified by this volume of IEEE\ Std\ 1003.1-2001 requires both users to terminate their end of the session explicitly. .LP Only messages sent to the terminal of the invoking user can be internationalized in any way: .IP " *" 3 The original "Message from <\fIunspecified string\fP> ..." message sent to the terminal of the recipient cannot be internationalized because the environment of the recipient is as yet inaccessible to the \fItalk\fP utility. The environment of the invoking party is irrelevant. .LP .IP " *" 3 Subsequent communication between the two parties cannot be internationalized because the two parties may specify different languages in their environment (and non-portable characters cannot be mapped from one language to another). .LP .IP " *" 3 Neither party can be required to communicate in a language other than C and/or the one specified by their environment because unavailable terminal hardware support (for example, fonts) may be required. .LP .LP The text in the STDOUT section reflects the usage of the verb "display" in this section; some \fItalk\fP implementations actually use standard output to write to the terminal, but this volume of IEEE\ Std\ 1003.1-2001 does not require that to be the case. .LP The format of the terminal name is unspecified, but the descriptions of \fIps\fP, \fItalk\fP, \fIwho\fP, and \fIwrite\fP require that they all use or accept the same format. .LP The handling of non-printable characters is partially implementation-defined because the details of mapping them to printable sequences is not needed by the user. Historical implementations, for security reasons, disallow the transmission of non-printable characters that may send commands to the other terminal. .SH FUTURE DIRECTIONS .LP None. .SH SEE ALSO .LP \fImesg\fP, \fIstty\fP, \fIwho\fP, \fIwrite\fP, the Base Definitions volume of IEEE\ Std\ 1003.1-2001, Chapter 11, General Terminal Interface .SH COPYRIGHT Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .