Re: [kernel patch] fcntl(...) to close many descriptors

[ Available lists | Index of freebsd-hackers | Month of Jan 2001 | Week of 28 Jan 2001 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Garance A Drosihn <drosih@rpi.edu>
Date
28 Jan 2001 23:01:36
Subject
Re: [kernel patch] fcntl(...) to close many descriptors
Message-ID
p05010400b69ac2c32903@[128.113.24.47]

In reply to
References to
Replies

[ Hide this part ]
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 <usebsd@free.fr> 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



Elapsed time: 0.204 seconds