ps and wall; How do they work?

Conor P. Cahill cpcahil at virtech.uucp
Sat Sep 15 23:20:01 AEST 1990


In article <13859 at smoke.BRL.MIL> gwyn at smoke.BRL.MIL (Doug Gwyn) writes:
>You're making the standard mistake that causes many applications to be
>less useful than they ought to be -- you're assuming a specific usage
>model rather than allowing for the unlimited flexibility that UNIX caters
>to.  Specifically, you assume that there is a person looking at data that
>is sent to every tty special device.  In many environments, that is far
>from correct.  For example, in mine there are printers attached to some
>ttys, with generic output blocked deliberately to prevent messing up what
>they are in the process of printing, and other ttys are being used for
>binary communication between cooperating processes (one on the host and
>one in the terminal).  Generic write access is turned off on such ttys
>for a REASON, and it is utterly inappropriate for some unrelated
>application to presume that it knows best and override the write block.
>

Doesn't wall(1) just send messages to terminals that users are logged
into?  Then there shouldn't be a problem with printer or other comm
ports where user's are not logged in.

To handle the case where a comm program is initiated once the connection
is established, the comm program should be able to handle (and ignore) 
the noise generated by the message.  If that is not feasible, perhaps 
a solution where the process turns off the "owner-write" permission
bits (this is not what mesg -n does) on a tty and write is modified to
not send a message to this port.  I don't think this is necessary.

>Maybe it is important for him to hear about impending system shutdown, etc.
>or maybe it isn't -- however, he has assumed the responsibility for not
>receiving "wall" messages and it is not proper for "wall" to second-guess
>his intentions.

If you want to allow this, I thing there needs to be two levels of mesg.
The first level for turning off other user messages (like talk or write) and
the second for turning off system level messages.  Most people who use mesg
think that they are just turning off the capability for other (non-system)
people to send messages/initiate communications.

>What is really needed is proper session and terminal management, but
>lacking those we should at least honor deliberate user decisions.

Agreed on the first part. As to the second, there needs to be some
clarification of exactly what the deliberate user decision is.

-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.,
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170 



More information about the Comp.unix.questions mailing list