Re: file ID redesign proposal
Richard Gooch (rgooch@atnf.CSIRO.AU)
Thu, 4 Dec 1997 15:23:09 +1100
Michael Elizabeth Chastain writes:
> Hello kernel hackers,
>
> How about an O_FDANY flag to open(2), which indicates that the
> caller will accept any positive number as a file descriptor?
>
> Similarly, for network connects, a setsockopt(SO_FDANY).
>
> Just an idea. If it's stupid, flame me gently, please.
I think it's a good idea. Better than adding a new syscall (besides,
you'd then need open_any(2) and open64_any(2)).
And it's easy for people to make use of in a reliable way:
int flags = 0;
#ifdef O_FDANY
flags |= O_FDANY;
#endif
fd = open ("/tmp/file", flags, 0);
Regards,
Richard....