NetBSD Problem Report #361

From gnats  Fri Jul 22 14:49:29 1994
Received: from bloom-beacon.mit.edu (BLOOM-BEACON.MIT.EDU [18.181.0.26]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with SMTP id OAA00180 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Fri, 22 Jul 1994 14:49:28 -0700
Message-Id: <199407221918.PAA02002@orchard.medford.ma.us>
Date: Fri, 22 Jul 1994 15:18:22 -0400
From: sommerfeld@orchard.medford.ma.us
Reply-To: sommerfeld@orchard.medford.ma.us
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: true and false are 12kb each..
X-Send-Pr-Version: 3.2

>Number:         361
>Category:       bin
>Synopsis:       true and false are 12kb each..
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 22 14:50:02 +0000 1994
>Closed-Date:    Fri Aug 05 22:57:44 +0000 1994
>Last-Modified:  
>Originator:     Bill Sommerfeld
>Release:        
>Organization:
"	"
>Environment:

System: NetBSD orchard.medford.ma.us 1.0-ALPHA NetBSD 1.0-ALPHA (ORCHARD) #4: Fri Jul 22 10:36:08 EDT 1994 root@orchard.medford.ma.us:/u1/nsys/sys/arch/i386/compile/ORCHARD i386

>Description:
	/usr/bin/true and /usr/bin/false are too big.
>How-To-Repeat:
	on i386, they're 12kb each.
>Fix:
	choose one or more:
	link statically.
	call _exit(); instead of exit();
	replace with one-line shell scripts.
	(though I hear AT&T has a copyright on those :-) ).

	Seriously, the minimum shared-library executable size seems to
	be 12K (3, 4k blocks), which seems to be larger than desirable..
>Release-Note:
>Audit-Trail:

State-Changed-From-To: open->analyzed
State-Changed-By: jtc
State-Changed-When: Mon Jul 25 10:30:33 1994
State-Changed-Why:
My vote is for replacing true and false with shell scripts.  

Now that the shell has a true and false builtin (as required by
POSIX.2), we could implement the scripts as follows:

	#!/bin/sh
	true

and
	#!/bin/sh
	false

But if a user replaced /bin/sh with something without the builtins, it
would go into an infinate loop.  I think this is a quality of
implementation issue that we'd rather avoid.

If I remember correctly, the AT&T "true" was just a big copyright
notice, and "false" was a big copyright notice followed by "exit 255".
So, there should be no problem wrt. copyright infringment if our true
implementation was "exit 0" and our false implementation was "exit 1".

The minimum shared executable size is a separate issue and should be
submitted as a separate PR.

State-Changed-From-To: analyzed->closed
State-Changed-By: jtc
State-Changed-When: Fri Aug  5 22:57:44 1994
State-Changed-Why:
True and false have been replaced by one line shell scripts.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.