From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3/2) with ESMTP id DAA06754 for ; Tue, 25 Jun 1996 03:49:12 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id NAA06427; Mon, 24 Jun 1996 13:21:07 -0400 (EDT) Resent-Date: Mon, 24 Jun 1996 13:21:07 -0400 (EDT) Date: Mon, 24 Jun 1996 19:18:02 +0200 (MET DST) From: Janos Farkas To: zsh-workers@math.gatech.edu Subject: Some utmp feature fixes for WATCH Message-ID: X-Mood: in love MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Resent-Message-ID: <"n2Kdi1.0.Ia1.zvipn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1432 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu [Part 2 of 2 from my just-found forgotten bug list :)] With the WATCH feature, and without this patch, I used to get messages like: root has logged off 2 from . has logged on 2 from . has logged off p1 from somehost. someuser has logged on p1 from somehost. This clearly depends on the utmp-managing programs, but I think it's correct to ignore the entries which do not contain a name. Janos diff -urN zsh-2.6-beta21.orig/Src/watch.c zsh-2.6-beta21/Src/watch.c --- zsh-2.6-beta21.orig/Src/watch.c Mon May 6 16:08:59 1996 +++ zsh-2.6-beta21/Src/watch.c Sun Jun 23 22:56:56 1996 @@ -274,6 +274,9 @@ char *v, *vv, sav; int bad; + if (*u->ut_name == 0) + return; + if (*w && !strcmp(*w, "all")) { (void)watchlog2(inout, u, fmt, 1, 0); return;