[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: file descriptor for io.popen (POSIX)?
- From: nr@... (Norman Ramsey)
- Date: Sat, 19 Aug 2006 14:36:32 -0400 (EDT)
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