Carl J wrote:

Hi!

Today I noticed that on Single Unix Specification V2,
as well as on the Linux 2.4.26 machine I have here,
that the open() call promises to return the lowest
unused file descriptor when successful.

I'm just wondering: does FreeBSD 4.x and 5.x promise
that? If so, should we update the manpage
to match SUSv2 more closely?

Thank you!

- Carl


4.x I'm pretty sure about 5.x I know does. This isn't a new thing. Since as far back as I can remember the UNIX semantics have been to return the lowest unused fd on an open(2) call. This has also been the subject of much discussion as finding the first free descriptor can cost a lot of processing power for applications that use large numbers of descriptors. FreeBSD uses a bitmap with hints I believe. All code would be in sys/kern_descrip.c.

--
Ryan Sommers
[EMAIL PROTECTED]

_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to