From pauls@shit.etext.org  Sat Nov  7 14:19:59 1998
Received: from shit.etext.org (shit.etext.org [207.24.215.147])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA16493
          for <FreeBSD-gnats-submit@freebsd.org>; Sat, 7 Nov 1998 14:19:56 -0800 (PST)
          (envelope-from pauls@shit.etext.org)
Received: (from pauls@localhost)
	by shit.etext.org (8.9.1/8.9.1) id RAA00620;
	Sat, 7 Nov 1998 17:19:41 -0500 (EST)
	(envelope-from pauls)
Message-Id: <199811072219.RAA00620@shit.etext.org>
Date: Sat, 7 Nov 1998 17:19:41 -0500 (EST)
From: pauls@etext.org
Reply-To: pauls@etext.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: 'uptime' behavior varies by arg zero
X-Send-Pr-Version: 3.2

>Number:         8593
>Category:       bin
>Synopsis:       'uptime' behavior varies by arg zero
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov  7 14:30:00 PST 1998
>Closed-Date:    Sun Nov 8 17:19:32 PST 1998
>Last-Modified:  Wed Dec 23 09:50:01 PST 1998
>Originator:     Paul Southworth
>Release:        FreeBSD 3.0-RELEASE i386
>Organization:
>Environment:

	Problem occurs when using either /bin/csh or /bin/sh
	FreeBSD 2.2.7-RELEASE does not have this problem.

>Description:

	If 'uptime' is invoked as 'uptime', it works properly.
	If 'uptime' is invoked as '/usr/bin/uptime', it behaves as 'w'.

>How-To-Repeat:

$ uptime
 5:01PM  up 29 mins, 3 users, load averages: 0.00, 0.00, 0.00
$ /usr/bin/uptime
 5:01PM  up 29 mins, 3 users, load averages: 0.00, 0.00, 0.00
USER             TTY      FROM              LOGIN@  IDLE WHAT
pauls            p1       :0.0              4:33PM    36 -sh (csh)
pauls            p2       :0.0              4:33PM     - /usr/bin/uptime
pauls            p3       :0.0              4:33PM 2days -sh (csh)
$ ident /usr/bin/uptime
/usr/bin/uptime:
     $Id: fmt.c,v 1.12 1998/06/17 11:33:10 jkoshy Exp $
     $Id: pr_time.c,v 1.11 1997/12/28 17:50:10 alex Exp $
     $Id: w.c,v 1.28 1998/06/09 04:35:20 imp Exp $

There is only one 'uptime' executable on the system, and 'uptime' is
'/usr/bin/uptime' in my $PATH.  System is 100% vanilla 3.0-RELEASE.

>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: steve 
State-Changed-When: Sun Nov 8 17:19:32 PST 1998 
State-Changed-Why:  
Fixed in revision 1.29 of w.c.  Thanks! 

From: Mike Holling <myke@ees.com>
To: freebsd-gnats-submit@freebsd.org, pauls@etext.org
Cc:  Subject: Re:bin/8593:'uptime'behaviorvariesbyargzero
Date: Wed, 23 Dec 1998 01:03:02 -0800 (PST)

 >   How-To-Repeat
 >          
 >$ uptime
 > 5:01PM  up 29 mins, 3 users, load averages: 0.00, 0.00, 0.00
 >$ /usr/bin/uptime
 > 5:01PM  up 29 mins, 3 users, load averages: 0.00, 0.00, 0.00
 >USER             TTY      FROM              LOGIN@  IDLE WHAT
 >pauls            p1       :0.0              4:33PM    36 -sh (csh)
 >pauls            p2       :0.0              4:33PM     - /usr/bin/uptime
 >pauls            p3       :0.0              4:33PM 2days -sh (csh)
 >$ ident /usr/bin/uptime
 >/usr/bin/uptime:
 >     $Id: fmt.c,v 1.12 1998/06/17 11:33:10 jkoshy Exp $
 >     $Id: pr_time.c,v 1.11 1997/12/28 17:50:10 alex Exp $
 >     $Id: w.c,v 1.28 1998/06/09 04:35:20 imp Exp $
 >
 >There is only one 'uptime' executable on the system, and 'uptime' is
 >'/usr/bin/uptime' in my $PATH.  System is 100% vanilla 3.0-RELEASE.
 >
 >   Audit-Trail
 >          
 >State-Changed-From-To: open->closed
 >State-Changed-By: steve
 >State-Changed-When: Sun Nov 8 17:19:32 PST 1998
 >State-Changed-Why:
 >Fixed in revision 1.29 of w.c.  Thanks!
 
 Unfortunately, the bug has resurfaced.  I cvsup'd shortly after
 midnight on 12/23/98, installed the new update, and get the same
 behavior (on an otherwise stock 3.0 system):
 
 {beach} /usr/bin# ident uptime
 uptime:
      $Id: pr_time.c,v 1.6.2.4 1998/03/08 14:31:51 jkh Exp $
      $Id: w.c,v 1.16.2.8 1998/12/14 06:04:44 dillon Exp $
 
 {beach} /usr/bin# uptime
  1:00AM  up 1 day, 12:23, 3 users, load averages: 0.04, 0.03, 0.04
 
 {beach} /usr/bin# /usr/bin/uptime
  1:00AM  up 1 day, 12:23, 3 users, load averages: 0.03, 0.03, 0.04
 USER             TTY      FROM              LOGIN@  IDLE WHAT
 root             p0       don.dw.lan       Mon01PM  2:30 -zsh (zsh)
 root             p1       net25-cust199.pd  8:09PM     - -zsh (zsh)
 root             p2       net25-cust199.pd 12:41AM     - /usr/bin/uptime
 
 {beach} /usr/bin# uname -a
 FreeBSD beach.dw.lan 3.0-RELEASE FreeBSD 3.0-RELEASE #1: Sun Dec 20
 00:01:10 PST 1998     don@beach.dw.lan:/usr/src/sys/compile/BEACH
 i386
 
 
 In particular, this mildly breaks one of the Big Brother scripts,
 which is how I stumbled across the bug...
 
 - Mike

From: Steve Price <sprice@hiwaay.net>
To: Mike Holling <myke@ees.com>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re:bin/8593:'uptime'behaviorvariesbyargzero
Date: Wed, 23 Dec 1998 11:48:18 -0600 (CST)

 On Wed, 23 Dec 1998, Mike Holling wrote:
 
 #  Unfortunately, the bug has resurfaced.  I cvsup'd shortly after
 #  midnight on 12/23/98, installed the new update, and get the same
 #  behavior (on an otherwise stock 3.0 system):
 
 You will need to CVSup -current and not the RELEASE.  The
 latter is a tag and since the change I made went in after
 it went down you won't see it.  You can either get revision
 1.29 of /usr/src/usr.bin/w/w.c from the website or tweak
 your cvsupfile to grab the correct one.
 
 #  {beach} /usr/bin# ident uptime
 #  uptime:
 #       $Id: pr_time.c,v 1.6.2.4 1998/03/08 14:31:51 jkh Exp $
 #       $Id: w.c,v 1.16.2.8 1998/12/14 06:04:44 dillon Exp $
 
 BTW, these revisions appear to be on the 2.2.8 branch (ie.
 -stable) and not -current.  -current is where I committed
 the fix.  I'll commit this to -stable later today too.
 
 -steve
 
>Unformatted:
