From cfb2d28f711240017976f0bb8b597b8e8c83efeb Mon Sep 17 00:00:00 2001 From: "Liam J. Foy" Date: Sat, 5 Mar 2005 00:08:46 +0000 Subject: [PATCH] - Update mesg(1) to confirm to SUSv3 changes previously committed. - Add an example to mesg(1) Taken from: FreeBSD (rev: 1.9 and rev: 1.10) --- usr.bin/mesg/mesg.1 | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/usr.bin/mesg/mesg.1 b/usr.bin/mesg/mesg.1 index 8a281b8388..97f3a8d5a1 100644 --- a/usr.bin/mesg/mesg.1 +++ b/usr.bin/mesg/mesg.1 @@ -31,9 +31,9 @@ .\" .\" @(#)mesg.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD: src/usr.bin/mesg/mesg.1,v 1.7.2.1 2001/12/14 15:53:30 ru Exp $ -.\" $DragonFly: src/usr.bin/mesg/mesg.1,v 1.2 2003/06/17 04:29:29 dillon Exp $ +.\" $DragonFly: src/usr.bin/mesg/mesg.1,v 1.3 2005/03/05 00:08:46 liamfoy Exp $ .\" -.Dd June 6, 1993 +.Dd March 4, 2005 .Dt MESG 1 .Os .Sh NAME @@ -45,15 +45,17 @@ .Sh DESCRIPTION The .Nm -utility is invoked by a users to control write access others -have to the terminal device associated with the standard error -output. +utility is invoked by a user to control write access others +have to a terminal device. Write access is allowed by default, and programs such as .Xr talk 1 and .Xr write 1 may display messages on the terminal. .Pp +The first terminal device in the sequence of devices associated with standard +input, standard output and standard error is affected. +.Pp Options available: .Bl -tag -width flag .It Cm n @@ -64,8 +66,18 @@ Permits messages to be displayed. .Pp If no arguments are given, .Nm -displays the present message status to the standard error output. +displays the present message status to the standard output. +.Sh EXAMPLES +Disallow messages from other users to the current terminal: +.Pp +.Dl "mesg n" .Pp +Allow messages from other users to +.Pa ttyp1 +(assuming you are also logged in on that terminal): +.Pp +.Dl "mesg y 1" An error has occurred. .El -.Sh FILES -.Bl -tag -width /dev/[pt]ty[pq]? -compact -.It Pa /dev/[pt]ty[pq]? -.El +.Sh COMPATIBILITY +Previous versions of the +.Nm +utility wrote the message status to the standard error output and +affected the terminal attached to standard error without first trying the +standard input or output devices. .Sh SEE ALSO .Xr biff 1 , .Xr talk 1 , .Xr wall 1 , .Xr write 1 +.Sh STANDARDS +The +.Nm +utility conforms to +.St -p1003.1-2001 . .Sh HISTORY A .Nm -- 2.41.0