kern/120233: FreeBSD is missing fcntl() operation F_DUP2FD
Robert Watson
rwatson at FreeBSD.org
Sun Feb 3 11:20:02 PST 2008
The following reply was made to PR kern/120233; it has been noted by GNATS.
From: Robert Watson <rwatson at FreeBSD.org>
To: Jukka Ukkonen <jau at iki.fi>
Cc: freebsd-gnats-submit at 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
More information about the freebsd-bugs
mailing list