lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Mike Panetta wrote:
But does it have to differ? POSIX only states that open has to return a data structure representing a file (a file descriptor, in most cases its an int). So why can't lposix's open() return an opaque userdata that can be used in your underlying functions but look the same to Lualand? Its still POSIX, and it still works on anything that has the concept of open().

You're right, it does not have to differ, but it might. For example,
when writing or reading the file descriptor, does the operation
block until complete or buffer as much as possible and return what got
transferred?

Maybe I'm being dense and am assuming that if it's POSIX
compliant, then it's got signals, buffering, and all kinds
of cruft that may be unimplementable on some systems.

Let me do some more reading and thinking...

Ralph