Re: Alarm Call when using 'wall'

From: Bela Lubkin (belal_at_sco.com)
Date: 05/13/03


Date: 12 May 2003 20:57:10 -0400


[reposting article that didn't make it through the mail->news gateway]

John Clarke wrote:

> I am trying to write a script that uses wall to advise all users of
> information at certain times.
>
> Have tried the following at the command prompt:
>
> # echo 'test message to users' | wall
>
> This works fine and sends the message to all users BUT the screen from which
> I created it does not return to the # prompt but hangs until I receive:
>
> Alarm call
> #
>
> This occurs about 1 minute afterwards.
>
> Any ideas as to how I can get this to send a message and return immediately
> to the prompt???

`wall` tries to write to each user listed in /etc/utmp. There are
sometimes stale entries in utmp. These will cause wall to try to open
tty devices that aren't currently in use. Both pseudo-ttys and serial
port ttys can block opens when nothing's talking to the other end. wall
sets itself an alarm to keep from blocking forever in this situation;
that's what you're seeing.

Your best bet is to clean utmp. A helpful utility is at
ftp://ftp.armory.com/pub/scobins/cwtmp

>Bela<