From owner-cvs-all Tue Feb 4 3:43:36 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8356337B401; Tue, 4 Feb 2003 03:43:34 -0800 (PST) Received: from smtp03.iprimus.com.au (smtp03.iprimus.com.au [210.50.30.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A35E43FA3; Tue, 4 Feb 2003 03:43:33 -0800 (PST) (envelope-from tim@robbins.dropbear.id.au) Received: from smtp02.iprimus.net.au (210.50.76.70) by smtp03.iprimus.com.au (6.7.010) id 3E3E0A8100042F5D; Tue, 4 Feb 2003 22:43:24 +1100 Received: from dilbert.robbins.dropbear.id.au ([210.50.113.14]) by smtp02.iprimus.net.au with Microsoft SMTPSVC(5.0.2195.5600); Tue, 4 Feb 2003 22:43:23 +1100 Received: from dilbert.robbins.dropbear.id.au (xp05v10j4lag741k@localhost [127.0.0.1]) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6) with ESMTP id h14BhDVY008189; Tue, 4 Feb 2003 22:43:21 +1100 (EST) (envelope-from tim@dilbert.robbins.dropbear.id.au) Received: (from tim@localhost) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6/Submit) id h14Bh79a008188; Tue, 4 Feb 2003 22:43:07 +1100 (EST) (envelope-from tim) Date: Tue, 4 Feb 2003 22:43:07 +1100 From: Tim Robbins To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/bin/sh jobs.c Message-ID: <20030204224307.A8005@dilbert.robbins.dropbear.id.au> References: <200301270741.h0R7fCJe032467@repoman.freebsd.org> <20030203130740.GI30972@starjuice.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030203130740.GI30972@starjuice.net>; from sheldonh@starjuice.net on Mon, Feb 03, 2003 at 03:07:40PM +0200 X-OriginalArrivalTime: 04 Feb 2003 11:43:23.0972 (UTC) FILETIME=[9FBDD040:01C2CC42] Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Feb 03, 2003 at 03:07:40PM +0200, Sheldon Hearn wrote: > On (2003/01/26 23:41), Tim J. Robbins wrote: > > > Modified files: > > bin/sh jobs.c > > Log: > > Ensure that the TTY file descriptor is greater than or equal to 10 so that > > it doesn't interfere with the user's redirections. > > Could you add how the magic number 10 was calculated to the comment you > inserted? > > Also, it may be better for the comment to appear before the first use of > the magic number 10. > > Also, it may be better to use a macro to represent the magic number 10, > since it's used multiple times. I'll try to do something about it, but I'm not exactly sure where to document it. The number 10 comes about because each file descriptor that the user can manipulate is identified by a single digit. The magic number is used 3 times in jobs.c, 9 times in redir.c and 2 times in input.c. Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message