Unleashed v1.4
[unleashed.git] / share / man / man1 / mesg.1
blob8a3de96492769e05d33c9c73fb8d5fd0663c6263
1 .\"
2 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
3 .\" permission to reproduce portions of its copyrighted documentation.
4 .\" Original documentation from The Open Group can be obtained online at
5 .\" http://www.opengroup.org/bookstore/.
6 .\"
7 .\" The Institute of Electrical and Electronics Engineers and The Open
8 .\" Group, have given us permission to reprint portions of their
9 .\" documentation.
10 .\"
11 .\" In the following statement, the phrase ``this text'' refers to portions
12 .\" of the system documentation.
13 .\"
14 .\" Portions of this text are reprinted and reproduced in electronic form
15 .\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
16 .\" Standard for Information Technology -- Portable Operating System
17 .\" Interface (POSIX), The Open Group Base Specifications Issue 6,
18 .\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
19 .\" Engineers, Inc and The Open Group.  In the event of any discrepancy
20 .\" between these versions and the original IEEE and The Open Group
21 .\" Standard, the original IEEE and The Open Group Standard is the referee
22 .\" document.  The original Standard can be obtained online at
23 .\" http://www.opengroup.org/unix/online.html.
24 .\"
25 .\" This notice shall appear on any product containing this material.
26 .\"
27 .\" The contents of this file are subject to the terms of the
28 .\" Common Development and Distribution License (the "License").
29 .\" You may not use this file except in compliance with the License.
30 .\"
31 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32 .\" or http://www.opensolaris.org/os/licensing.
33 .\" See the License for the specific language governing permissions
34 .\" and limitations under the License.
35 .\"
36 .\" When distributing Covered Code, include this CDDL HEADER in each
37 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38 .\" If applicable, add the following below this CDDL HEADER, with the
39 .\" fields enclosed by brackets "[]" replaced with your own identifying
40 .\" information: Portions Copyright [yyyy] [name of copyright owner]
41 .\"
42 .\"
43 .\" Copyright 1989 AT&T
44 .\" Copyright (c) 1992, X/Open Company Limited.  All Rights Reserved.
45 .\" Portions Copyright (c) 1995, Sun Microsystems, Inc.  All Rights Reserved
46 .\"
47 .TH MESG 1 "Oct 31, 1997"
48 .SH NAME
49 mesg \- permit or deny messages
50 .SH SYNOPSIS
51 .LP
52 .nf
53 \fBmesg\fR [\fB-n\fR | \fB-y\fR | n | y]
54 .fi
56 .SH DESCRIPTION
57 .sp
58 .LP
59 The \fBmesg\fR utility will control whether other users are allowed to send
60 messages via \fBwrite\fR(1), \fBtalk\fR(1), or other utilities to a terminal
61 device. The terminal device affected is determined by searching for the first
62 terminal in the sequence of devices associated with standard input, standard
63 output, and standard error, respectively. With no arguments, \fBmesg\fR reports
64 the current state without changing it. Processes with appropriate privileges
65 may be able to send messages to the terminal independent of the current state.
66 .SH OPTIONS
67 .sp
68 .LP
69 The following options are supported:
70 .sp
71 .ne 2
72 .na
73 \fB\fB-n\fR|\fBn\fR \fR
74 .ad
75 .RS 9n
76 Denies permission to other users to send message to the terminal. See
77 \fBwrite\fR(1).
78 .RE
80 .sp
81 .ne 2
82 .na
83 \fB\fB-y\fR|\fBy\fR \fR
84 .ad
85 .RS 9n
86 Grants permission to other users to send messages to the terminal.
87 .RE
89 .SH ENVIRONMENT VARIABLES
90 .sp
91 .LP
92 See \fBenviron\fR(5) for descriptions of the following environment variables
93 that affect the execution of \fBmesg\fR: \fBLANG\fR, \fBLC_ALL\fR,
94 \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
95 .SH EXIT STATUS
96 .sp
97 .LP
98 The following exit values are returned:
99 .sp
100 .ne 2
102 \fB\fB0\fR \fR
104 .RS 6n
105 if messages are receivable.
109 .ne 2
111 \fB\fB1\fR \fR
113 .RS 6n
114 if messages are not receivable.
118 .ne 2
120 \fB\fB2\fR \fR
122 .RS 6n
123 on error.
126 .SH FILES
128 .ne 2
130 \fB\fB/dev/tty*\fR \fR
132 .RS 15n
133 terminal devices
137 .ne 2
139 \fB\fB/dev/pts/*\fR \fR
141 .RS 15n
142 terminal devices
145 .SH ATTRIBUTES
148 See \fBattributes\fR(5) for descriptions of the following attributes:
153 box;
154 c | c
155 l | l .
156 ATTRIBUTE TYPE  ATTRIBUTE VALUE
158 Interface Stability     Standard
161 .SH SEE ALSO
164 \fBtalk\fR(1), \fBwrite\fR(1), \fBattributes\fR(5), \fBenviron\fR(5),
165 \fBstandards\fR(5)