lua-users home
lua-l archive

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


I am using lua on a POSIX system, and I would like to
find a way to grap the underlying file descriptor associated
with a file, so that I can make it standard output.  E.g.,

local f = assert(io.popen('less', 'w'))
posix.dup2(fileno(f), 0)

My trouble is that I don't know how to implement 'fileno'.
Any suggestions?


Norman