From owner-freebsd-bugs@FreeBSD.ORG Sun Feb 3 19:20:02 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1E3116A419 for ; Sun, 3 Feb 2008 19:20:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id BAFEB13C4CE for ; Sun, 3 Feb 2008 19:20:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m13JK2FH044970 for ; Sun, 3 Feb 2008 19:20:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m13JK2u4044969; Sun, 3 Feb 2008 19:20:02 GMT (envelope-from gnats) Date: Sun, 3 Feb 2008 19:20:02 GMT Message-Id: <200802031920.m13JK2u4044969@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Robert Watson Cc: Subject: Re: kern/120233: FreeBSD is missing fcntl() operation F_DUP2FD X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Robert Watson List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2008 19:20:02 -0000 The following reply was made to PR kern/120233; it has been noted by GNATS. From: Robert Watson To: Jukka Ukkonen Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: kern/120233: FreeBSD is missing fcntl() operation F_DUP2FD Date: Sun, 3 Feb 2008 19:17:25 +0000 (GMT) On Sun, 3 Feb 2008, Jukka Ukkonen wrote: > I have had this modification in my own environments for some 4 years > starting from FreeBSD-4.x with no ill effects. In fact in my own C library I > have both dup() and dup2() only as wrappers for fcntl() and everything works > just fine. No opinion on the remainder of the patch, but just wanted to chime in on this one point: once a system call is in the ABI, we generally won't ever remove it. The reason is that this would break backward compatibility for older binaries and libraries that encode the old system call. There may be an argument for adding the new fcntl() interface, but there isn't really an argument to remove the old system calls that overrides the need for backward compatibility. I will generally comment that it's unfortunate that we end up with many APIs for the same operation, though, but that's generally a concern overriden by the need for portability. Robert N M Watson Computer Laboratory University of Cambridge