lua-users home
lua-l archive

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


http://www.opengroup.org/onlinepubs/000095399/functions/read.html

That seems to be dependant on the implementation.  So I guess the answer would be maybe. :) 

Mike

PS: A link to the spec.  This is actually the SUSV3 spec, which has way way more in it then any one system would ever implement.

http://www.unix.org/single_unix_specification/

On 10/17/06, Ralph Hempel <rhempel@hempeldesigngroup.com> wrote:
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