Я не думаю, что существует какой-либо прямой метод Lua-only. С luajit http://luajit.org/ (который предоставляет ffi) возможно:
local ffi = require'ffi'
--- The libc functions used by this process.
ffi.cdef[[
int open(const char* pathname, int flags);
int close(int fd);
int read(int fd, void* buf, size_t count);
]]
local O_NONBLOCK = 2048
local chunk_size = 4096
local buffer = ffi.new('uint8_t[?]',chunk_size)
local fd = ffi.C.open('mypipe',O_NONBLOCK)
local nbytes = ffi.C.read(fd,buffer,chunksize)
-- .. process data