]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - term-utils/mesg.1
agetty: make output more robust
[thirdparty/util-linux.git] / term-utils / mesg.1
index 60d942339541226715ecda8b1344652c4db1fba5..15c834dd71e49a409d58627307c757e7ef03015a 100644 (file)
 .\"
 .\"    @(#)mesg.1      8.1 (Berkeley) 6/6/93
 .\"
-.\" Fri Mar 10 20:31:02 1995, modified for standard man macros,
-.\" faith@cs.unc.edu
-.\"
-.\"
-.\" "
-.TH MESG 1 "April 2011" "util-linux" "User Commands"
+.TH MESG 1 "July 2014" "util-linux" "User Commands"
 .SH NAME
-mesg \- display (do not display) messages from other users
+mesg \- display (or do not display) messages from other users
 .SH SYNOPSIS
 .B mesg
-.RB [options]
+[option]
 .RB [ n | y ]
 .SH DESCRIPTION
 The
 .B mesg
-utility is invoked by a users to control write access others have to the
-terminal device associated with the standard error output.  If write access
+utility is invoked by a user to control write access others have to the
+terminal device associated with standard error output.  If write access
 is allowed, then programs such as
 .BR talk (1)
 and
@@ -60,47 +55,58 @@ write access by default, at least for the primary login shell.  To make
 sure your ttys are set the way you want them to be set,
 .B mesg
 should be executed in your login scripts.
+.PP
+The
+.B mesg
+utility silently exits with error status 2 if the current standard error output does
+not refer to the terminal.  In this case execute
+.B mesg
+is pointless.  The command line option \fB\-\-verbose\fR forces
+mesg to print a warning in this situation.  This behaviour has been introduced
+in version 2.33.
 .SH ARGUMENTS
 .TP
 .B n
-Disallows messages.
+Disallow messages.
 .TP
 .B y
-Permits messages to be displayed.
+Allow messages to be displayed.
+.PP
+If no arguments are given,
+.B mesg
+shows the current message status on standard error output.
 .SH OPTIONS
 .TP
-.B \-v, \-\-verbose
+.BR \-v , " \-\-verbose"
 Explain what is being done.
 .TP
-.B \-V, \-\-verbose
-Output version information and exit.
+.BR \-V , " \-\-version"
+Display version information and exit.
 .TP
-.B \-h, \-\-help
-Output help screen and exit.
-.PP
-If no arguments are given,
-.B mesg
-displays the present message status to the standard error output.
-.PP
+.BR \-h , " \-\-help"
+Display help text and exit.
+.SH EXIT STATUS
 The
 .B mesg
 utility exits with one of the following values:
+.RS 4
 .TP
-.I "\ 0"
+.B "\ 0"
 Messages are allowed.
 .TP
-.I "\ 1"
+.B "\ 1"
 Messages are not allowed.
 .TP
-.I ">1"
+.B ">1"
 An error has occurred.
+.RE
 .SH FILES
 .I /dev/[pt]ty[pq]?
 .SH "SEE ALSO"
+.BR login (1),
 .BR talk (1),
 .BR write (1),
 .BR wall (1),
-.BR login (1),
 .BR xterm (1)
 .SH HISTORY
 A
@@ -109,4 +115,4 @@ command appeared in Version 6 AT&T UNIX.
 
 .SH AVAILABILITY
 The mesg command is part of the util-linux package and is available from
-ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
+https://www.kernel.org/pub/linux/utils/util-linux/.