From owner-freebsd-hackers Sun Jan 28 23: 1:36 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.rpi.edu (mail.rpi.edu [128.113.100.7]) by hub.freebsd.org (Postfix) with ESMTP id B9FD437B402 for ; Sun, 28 Jan 2001 23:01:15 -0800 (PST) Received: from [128.113.24.47] (gilead.acs.rpi.edu [128.113.24.47]) by mail.rpi.edu (8.9.3/8.9.3) with ESMTP id CAA74768; Mon, 29 Jan 2001 02:01:05 -0500 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <200101290303.f0T33qg60603@earth.backplane.com> References: <200101281837.f0SIbGI24332@iguana.aciri.org> <200101290303.f0T33qg60603@earth.backplane.com> Date: Mon, 29 Jan 2001 02:01:04 -0500 To: Matt Dillon , Luigi Rizzo From: Garance A Drosihn Subject: Re: [kernel patch] fcntl(...) to close many descriptors Cc: usebsd@free.fr (mouss), hackers@FreeBSD.ORG, wollman@khavrinen.lcs.mit.edu Content-Type: text/plain; charset="us-ascii" ; format="flowed" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG At 7:03 PM -0800 1/28/01, Matt Dillon wrote: >Luigo wrote: >: do we have (or could we design) a generic mechanism for >: machine-specific syscalls which are not available on all OS ? >: >: basically i am thinking of something like >: >: generic_syscall("fdcloseall", ....); >: >: In this way it would be clear what the non-portable pieces of code >: are, and the mechanism would be extensible with no changes to >: libraries and syscalls. You could even have dynamically-loaded >: modules implementing new "syscalls". >: >: cheers >: luigi > > There is work going on for the AIX equivalent using fcntl(). > We should not create a syscall (it's unnecessary)... if you > want a fdcloseall() function call, it should be in libc and > use the fcntl. Note that Luigi was asking for a generic syscall mechanism, and was only using fdcloseall as an example of how that might be used. [it was I who made the mistaken-assumption that any closeallfds routine would be somewhere in the kernel. I have no idea why I thought that...] > I would support one or the other, but not both. I'd recommend > the AIX fcntl API, since it's been around a whole lot longer. > > -Matt Mouss mentioned that NetBSD has a closeall function in it's libc, and it sounded like he was going to mimic that instead of the fcntl change. If I were going to mimic something, I'd rather mimic netbsd than some feature which exists only in AIX. And as I mentioned in my previous message, I think the AIX strategy warps the definition of the fcntl routine, so I was not too fond of it even if there hadn't been any BSD-based alternative to follow. -- Garance Alistair Drosehn = gad@eclipse.acs.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message