Date: Sun, 3 Feb 2008 19:20:02 GMT From: Robert Watson <rwatson@FreeBSD.org> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/120233: FreeBSD is missing fcntl() operation F_DUP2FD Message-ID: <200802031920.m13JK2u4044969@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/120233; it has been noted by GNATS. From: Robert Watson <rwatson@FreeBSD.org> To: Jukka Ukkonen <jau@iki.fi> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802031920.m13JK2u4044969>