Obtained from: my fix for 1.1.5

Remove compatibility hack so that dup(fd) isn't interpreted as
dup2(fd & 0x3f, random_junk_on_stack_fd) when (fd & 0x3f) != 0.
This commit is contained in:
Bruce Evans 1994-12-12 12:27:39 +00:00
parent 6976af69e8
commit 20989d2d64
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=5082

View file

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94
* $Id: kern_descrip.c,v 1.5 1994/09/25 19:33:35 phk Exp $
* $Id: kern_descrip.c,v 1.6 1994/10/02 17:35:11 phk Exp $
*/
#include <sys/param.h>
@ -143,10 +143,13 @@ dup(p, uap, retval)
int new, error;
old = uap->fd;
#if 0
/*
* XXX Compatibility
*/
if (old &~ 077) { uap->fd &= 077; return (dup2(p, uap, retval)); }
#endif
fdp = p->p_fd;
if (old >= fdp->fd_nfiles || fdp->fd_ofiles[old] == NULL)