From owner-cvs-all Thu Apr 18 21:20:30 2002 Delivered-To: cvs-all@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id C751937B404; Thu, 18 Apr 2002 21:20:24 -0700 (PDT) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.11.4/8.11.6) id g3J4KMC69617; Fri, 19 Apr 2002 00:20:22 -0400 (EDT) (envelope-from wollman) Date: Fri, 19 Apr 2002 00:20:22 -0400 (EDT) From: Garrett Wollman Message-Id: <200204190420.g3J4KMC69617@khavrinen.lcs.mit.edu> To: "M. Warner Losh" Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_descrip.c kern_exec.c src/sys/sys filedesc.h In-Reply-To: <20020418.220125.06947209.imp@village.org> References: <200204190045.g3J0jUY59526@freefall.freebsd.org> <200204190309.g3J39tE69057@khavrinen.lcs.mit.edu> <20020418.220125.06947209.imp@village.org> 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 < said: > There is no other way to fix this than in the kernel... Sure there is -- make sure that every privileged process has something on every fd. You could do it in csu (although from a standards perspective that would make no difference). Or, alternatively, rather than changing exec(), you could change fdalloc() to never return fd 0, 1, or 2 except when explicitly requested by dup2() -- although this would break some seriously old programs that expect to be able to do fd = open(...) close(1); dup(fd); and have it work. (These programs are broken anyway -- the Standard does not guarantee any particular order of fd allocation.) -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message