Date: Tue, 4 Feb 2003 22:43:07 +1100 From: Tim Robbins <tjr@FreeBSD.org> 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> In-Reply-To: <20030203130740.GI30972@starjuice.net>; from sheldonh@starjuice.net on Mon, Feb 03, 2003 at 03:07:40PM %2B0200 References: <200301270741.h0R7fCJe032467@repoman.freebsd.org> <20030203130740.GI30972@starjuice.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030204224307.A8005>